/* * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPermissionManager.idl */ #ifndef __gen_nsIPermissionManager_h__ #define __gen_nsIPermissionManager_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif #ifndef __gen_nsISimpleEnumerator_h__ #include "nsISimpleEnumerator.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsIPermissionManager */ #define NS_IPERMISSIONMANAGER_IID_STR "4f6b5e00-0c36-11d5-a535-0010a401eb10" #define NS_IPERMISSIONMANAGER_IID \ {0x4f6b5e00, 0x0c36, 0x11d5, \ { 0xa5, 0x35, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }} class NS_NO_VTABLE nsIPermissionManager : public nsISupports { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPERMISSIONMANAGER_IID) /* void add (in string objectURL, in boolean permission, in PRInt32 type); */ NS_IMETHOD Add(const char *objectURL, PRBool permission, PRInt32 type) = 0; /* boolean testForBlocking (in string objectURL, in PRInt32 type); */ NS_IMETHOD TestForBlocking(const char *objectURL, PRInt32 type, PRBool *_retval) = 0; /* void removeAll (); */ NS_IMETHOD RemoveAll(void) = 0; /* readonly attribute nsISimpleEnumerator enumerator; */ NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0; /* void remove (in string host, in PRInt32 type); */ NS_IMETHOD Remove(const char *host, PRInt32 type) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIPERMISSIONMANAGER \ NS_IMETHOD Add(const char *objectURL, PRBool permission, PRInt32 type); \ NS_IMETHOD TestForBlocking(const char *objectURL, PRInt32 type, PRBool *_retval); \ NS_IMETHOD RemoveAll(void); \ NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \ NS_IMETHOD Remove(const char *host, PRInt32 type); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIPERMISSIONMANAGER(_to) \ NS_IMETHOD Add(const char *objectURL, PRBool permission, PRInt32 type) { return _to Add(objectURL, permission, type); } \ NS_IMETHOD TestForBlocking(const char *objectURL, PRInt32 type, PRBool *_retval) { return _to TestForBlocking(objectURL, type, _retval); } \ NS_IMETHOD RemoveAll(void) { return _to RemoveAll(); } \ NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \ NS_IMETHOD Remove(const char *host, PRInt32 type) { return _to Remove(host, type); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIPERMISSIONMANAGER(_to) \ NS_IMETHOD Add(const char *objectURL, PRBool permission, PRInt32 type) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(objectURL, permission, type); } \ NS_IMETHOD TestForBlocking(const char *objectURL, PRInt32 type, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->TestForBlocking(objectURL, type, _retval); } \ NS_IMETHOD RemoveAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \ NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \ NS_IMETHOD Remove(const char *host, PRInt32 type) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(host, type); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsPermissionManager : public nsIPermissionManager { public: NS_DECL_ISUPPORTS NS_DECL_NSIPERMISSIONMANAGER nsPermissionManager(); virtual ~nsPermissionManager(); /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsPermissionManager, nsIPermissionManager) nsPermissionManager::nsPermissionManager() { NS_INIT_ISUPPORTS(); /* member initializers and constructor code */ } nsPermissionManager::~nsPermissionManager() { /* destructor code */ } /* void add (in string objectURL, in boolean permission, in PRInt32 type); */ NS_IMETHODIMP nsPermissionManager::Add(const char *objectURL, PRBool permission, PRInt32 type) { return NS_ERROR_NOT_IMPLEMENTED; } /* boolean testForBlocking (in string objectURL, in PRInt32 type); */ NS_IMETHODIMP nsPermissionManager::TestForBlocking(const char *objectURL, PRInt32 type, PRBool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void removeAll (); */ NS_IMETHODIMP nsPermissionManager::RemoveAll() { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute nsISimpleEnumerator enumerator; */ NS_IMETHODIMP nsPermissionManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return NS_ERROR_NOT_IMPLEMENTED; } /* void remove (in string host, in PRInt32 type); */ NS_IMETHODIMP nsPermissionManager::Remove(const char *host, PRInt32 type) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif // {4F6B5E00-0C36-11d5-A535-0010A401EB10} #define NS_PERMISSIONMANAGER_CID \ { 0x4f6b5e00, 0xc36, 0x11d5, { 0xa5, 0x35, 0x0, 0x10, 0xa4, 0x1, 0xeb, 0x10 } } #define NS_PERMISSIONMANAGER_CONTRACTID "@mozilla.org/permissionmanager;1" #endif /* __gen_nsIPermissionManager_h__ */ .