1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/base/public/nsIPermissionManager.idl
3 : */
4 :
5 : #ifndef __gen_nsIPermissionManager_h__
6 : #define __gen_nsIPermissionManager_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsISimpleEnumerator_h__
14 : #include "nsISimpleEnumerator.h"
15 : #endif
16 :
17 : /* For IDL files that don't want to include root IDL files. */
18 : #ifndef NS_NO_VTABLE
19 : #define NS_NO_VTABLE
20 : #endif
21 : class nsIURI; /* forward declaration */
22 :
23 : class nsIObserver; /* forward declaration */
24 :
25 :
26 : /* starting interface: nsIPermissionManager */
27 : #define NS_IPERMISSIONMANAGER_IID_STR "0b83f9d5-3f96-41b6-91aa-ff3a7e4880d7"
28 :
29 : #define NS_IPERMISSIONMANAGER_IID \
30 : {0x0b83f9d5, 0x3f96, 0x41b6, \
31 : { 0x91, 0xaa, 0xff, 0x3a, 0x7e, 0x48, 0x80, 0xd7 }}
32 :
33 400 : class NS_NO_VTABLE NS_SCRIPTABLE nsIPermissionManager : public nsISupports {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERMISSIONMANAGER_IID)
37 :
38 : enum {
39 : UNKNOWN_ACTION = 0U,
40 : ALLOW_ACTION = 1U,
41 : DENY_ACTION = 2U,
42 : EXPIRE_NEVER = 0U,
43 : EXPIRE_SESSION = 1U,
44 : EXPIRE_TIME = 2U
45 : };
46 :
47 : /* void add (in nsIURI uri, in string type, in PRUint32 permission, [optional] in PRUint32 expireType, [optional] in PRInt64 expireTime); */
48 : NS_SCRIPTABLE NS_IMETHOD Add(nsIURI *uri, const char * type, PRUint32 permission, PRUint32 expireType, PRInt64 expireTime) = 0;
49 :
50 : /* void remove (in AUTF8String host, in string type); */
51 : NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & host, const char * type) = 0;
52 :
53 : /* void removeAll (); */
54 : NS_SCRIPTABLE NS_IMETHOD RemoveAll(void) = 0;
55 :
56 : /* PRUint32 testPermission (in nsIURI uri, in string type); */
57 : NS_SCRIPTABLE NS_IMETHOD TestPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM) = 0;
58 :
59 : /* PRUint32 testExactPermission (in nsIURI uri, in string type); */
60 : NS_SCRIPTABLE NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM) = 0;
61 :
62 : /* readonly attribute nsISimpleEnumerator enumerator; */
63 : NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0;
64 :
65 : };
66 :
67 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIPermissionManager, NS_IPERMISSIONMANAGER_IID)
68 :
69 : /* Use this macro when declaring classes that implement this interface. */
70 : #define NS_DECL_NSIPERMISSIONMANAGER \
71 : NS_SCRIPTABLE NS_IMETHOD Add(nsIURI *uri, const char * type, PRUint32 permission, PRUint32 expireType, PRInt64 expireTime); \
72 : NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & host, const char * type); \
73 : NS_SCRIPTABLE NS_IMETHOD RemoveAll(void); \
74 : NS_SCRIPTABLE NS_IMETHOD TestPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM); \
75 : NS_SCRIPTABLE NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM); \
76 : NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator);
77 :
78 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
79 : #define NS_FORWARD_NSIPERMISSIONMANAGER(_to) \
80 : NS_SCRIPTABLE NS_IMETHOD Add(nsIURI *uri, const char * type, PRUint32 permission, PRUint32 expireType, PRInt64 expireTime) { return _to Add(uri, type, permission, expireType, expireTime); } \
81 : NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & host, const char * type) { return _to Remove(host, type); } \
82 : NS_SCRIPTABLE NS_IMETHOD RemoveAll(void) { return _to RemoveAll(); } \
83 : NS_SCRIPTABLE NS_IMETHOD TestPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM) { return _to TestPermission(uri, type, _retval); } \
84 : NS_SCRIPTABLE NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM) { return _to TestExactPermission(uri, type, _retval); } \
85 : NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); }
86 :
87 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
88 : #define NS_FORWARD_SAFE_NSIPERMISSIONMANAGER(_to) \
89 : NS_SCRIPTABLE NS_IMETHOD Add(nsIURI *uri, const char * type, PRUint32 permission, PRUint32 expireType, PRInt64 expireTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(uri, type, permission, expireType, expireTime); } \
90 : NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & host, const char * type) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(host, type); } \
91 : NS_SCRIPTABLE NS_IMETHOD RemoveAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \
92 : NS_SCRIPTABLE NS_IMETHOD TestPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->TestPermission(uri, type, _retval); } \
93 : NS_SCRIPTABLE NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->TestExactPermission(uri, type, _retval); } \
94 : NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); }
95 :
96 : #if 0
97 : /* Use the code below as a template for the implementation class for this interface. */
98 :
99 : /* Header file */
100 : class nsPermissionManager : public nsIPermissionManager
101 : {
102 : public:
103 : NS_DECL_ISUPPORTS
104 : NS_DECL_NSIPERMISSIONMANAGER
105 :
106 : nsPermissionManager();
107 :
108 : private:
109 : ~nsPermissionManager();
110 :
111 : protected:
112 : /* additional members */
113 : };
114 :
115 : /* Implementation file */
116 : NS_IMPL_ISUPPORTS1(nsPermissionManager, nsIPermissionManager)
117 :
118 : nsPermissionManager::nsPermissionManager()
119 : {
120 : /* member initializers and constructor code */
121 : }
122 :
123 : nsPermissionManager::~nsPermissionManager()
124 : {
125 : /* destructor code */
126 : }
127 :
128 : /* void add (in nsIURI uri, in string type, in PRUint32 permission, [optional] in PRUint32 expireType, [optional] in PRInt64 expireTime); */
129 : NS_IMETHODIMP nsPermissionManager::Add(nsIURI *uri, const char * type, PRUint32 permission, PRUint32 expireType, PRInt64 expireTime)
130 : {
131 : return NS_ERROR_NOT_IMPLEMENTED;
132 : }
133 :
134 : /* void remove (in AUTF8String host, in string type); */
135 : NS_IMETHODIMP nsPermissionManager::Remove(const nsACString & host, const char * type)
136 : {
137 : return NS_ERROR_NOT_IMPLEMENTED;
138 : }
139 :
140 : /* void removeAll (); */
141 : NS_IMETHODIMP nsPermissionManager::RemoveAll()
142 : {
143 : return NS_ERROR_NOT_IMPLEMENTED;
144 : }
145 :
146 : /* PRUint32 testPermission (in nsIURI uri, in string type); */
147 : NS_IMETHODIMP nsPermissionManager::TestPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM)
148 : {
149 : return NS_ERROR_NOT_IMPLEMENTED;
150 : }
151 :
152 : /* PRUint32 testExactPermission (in nsIURI uri, in string type); */
153 : NS_IMETHODIMP nsPermissionManager::TestExactPermission(nsIURI *uri, const char * type, PRUint32 *_retval NS_OUTPARAM)
154 : {
155 : return NS_ERROR_NOT_IMPLEMENTED;
156 : }
157 :
158 : /* readonly attribute nsISimpleEnumerator enumerator; */
159 : NS_IMETHODIMP nsPermissionManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator)
160 : {
161 : return NS_ERROR_NOT_IMPLEMENTED;
162 : }
163 :
164 : /* End of implementation class template. */
165 : #endif
166 :
167 : #define NS_PERMISSIONMANAGER_CONTRACTID "@mozilla.org/permissionmanager;1"
168 : #define PERM_CHANGE_NOTIFICATION "perm-changed"
169 :
170 : #endif /* __gen_nsIPermissionManager_h__ */
|