core/ShareSys.h
changeset 2841 dde3dd0b4b8b
parent 2545 9cb1a1fefc2c
     1.1 --- a/core/ShareSys.h	Wed Oct 28 00:31:48 2009 -0700
     1.2 +++ b/core/ShareSys.h	Wed Oct 28 00:37:34 2009 -0700
     1.3 @@ -87,7 +87,13 @@
     1.4  	FakeNative *fake;
     1.5  };
     1.6  
     1.7 -class ShareSystem : 
     1.8 +struct Capability
     1.9 +{
    1.10 +	IExtension *ext;
    1.11 +	IFeatureProvider *provider;
    1.12 +};
    1.13 +
    1.14 +class ShareSystem :
    1.15  	public IShareSys,
    1.16  	public SMGlobalClass,
    1.17  	public IHandleTypeDispatch
    1.18 @@ -110,6 +116,10 @@
    1.19  	void AddDependency(IExtension *myself, const char *filename, bool require, bool autoload);
    1.20  	void RegisterLibrary(IExtension *myself, const char *name);
    1.21  	void OverrideNatives(IExtension *myself, const sp_nativeinfo_t *natives);
    1.22 +	void AddCapabilityProvider(IExtension *myself, IFeatureProvider *provider,
    1.23 +		                       const char *name);
    1.24 +	void DropCapabilityProvider(IExtension *myself, IFeatureProvider *provider,
    1.25 +		                        const char *name);
    1.26  public: //SMGlobalClass
    1.27  	/* Pre-empt in case anything tries to register idents early */
    1.28  	void Initialize();
    1.29 @@ -119,6 +129,9 @@
    1.30  public:
    1.31  	IdentityToken_t *CreateCoreIdentity();
    1.32  	void RemoveInterfaces(IExtension *pExtension);
    1.33 +	FeatureStatus TestFeature(IPluginRuntime *pRuntime, FeatureType feature, const char *name);
    1.34 +	FeatureStatus TestNative(IPluginRuntime *pRuntime, const char *name);
    1.35 +	FeatureStatus TestCap(const char *name);
    1.36  public:
    1.37  	inline IdentityToken_t *GetIdentRoot()
    1.38  	{
    1.39 @@ -143,6 +156,7 @@
    1.40  	HandleType_t m_IfaceType;
    1.41  	IdentityType_t m_CoreType;
    1.42  	KTrie<NativeEntry *> m_NtvCache;
    1.43 +	KTrie<Capability> m_caps;
    1.44  };
    1.45  
    1.46  extern ShareSystem g_ShareSys;