added usage of the Handle System to begin experimenting

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40257
This commit is contained in:
David Anderson
2007-01-01 19:50:16 +00:00
parent a4363dfa4f
commit 2fc806542a
13 changed files with 190 additions and 6 deletions
+2 -2
View File
@@ -302,10 +302,10 @@ Handle_t HandleSystem::CreateHandle(HandleType_t type, void *object, IdentityTok
Handle_t HandleSystem::CreateScriptHandle(HandleType_t type,
void *object,
sp_context_t *ctx,
IPluginContext *pContext,
IdentityToken_t *ident)
{
IPlugin *pPlugin = g_PluginSys.FindPluginByContext(ctx);
IPlugin *pPlugin = g_PluginSys.FindPluginByContext(pContext->GetContext());
return CreateHandle(type, object, pPlugin->GetIdentity(), ident);
}
+1 -1
View File
@@ -90,7 +90,7 @@ public: //IHandleSystem
void *object,
IdentityToken_t *source,
IdentityToken_t *ident);
Handle_t CreateScriptHandle(HandleType_t type, void *object, sp_context_t *ctx, IdentityToken_t *ident);
Handle_t CreateScriptHandle(HandleType_t type, void *object, IPluginContext *pContext, IdentityToken_t *ident);
HandleError FreeHandle(Handle_t handle, IdentityToken_t *ident);
HandleError CloneHandle(Handle_t handle, Handle_t *newhandle, IdentityToken_t *source, IdentityToken_t *ident);
HandleError ReadHandle(Handle_t handle, HandleType_t type, IdentityToken_t *ident, void **object);
+5
View File
@@ -93,6 +93,11 @@ void CDirectory::NextEntry()
#endif
}
bool CDirectory::IsEntryValid()
{
return IsValid();
}
bool CDirectory::IsEntryDirectory()
{
#if defined PLATFORM_WINDOWS
+1
View File
@@ -23,6 +23,7 @@ public:
virtual const char *GetEntryName();
virtual bool IsEntryDirectory();
virtual bool IsEntryFile();
virtual bool IsEntryValid();
public:
bool IsValid();
private: