DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/comm-central/netwerk/base/nsIPermissionManager.idl
 */

#ifndef __gen_nsIPermissionManager_h__
#define __gen_nsIPermissionManager_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIURI; /* forward declaration */

class nsIObserver; /* forward declaration */

class nsIPrincipal; /* forward declaration */

class mozIDOMWindow; /* forward declaration */

class nsIPermission; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */

class nsIRunnable; /* forward declaration */

namespace IPC {
struct Permission;
}
#include "nsTArrayForwardDeclare.h"

/* starting interface:    nsIPermissionManager */
#define NS_IPERMISSIONMANAGER_IID_STR "4dcb3851-eba2-4e42-b236-82d2596fca22"

#define NS_IPERMISSIONMANAGER_IID \
  {0x4dcb3851, 0xeba2, 0x4e42, \
    { 0xb2, 0x36, 0x82, 0xd2, 0x59, 0x6f, 0xca, 0x22 }}

class NS_NO_VTABLE nsIPermissionManager : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERMISSIONMANAGER_IID)

  enum {
    UNKNOWN_ACTION = 0U,
    ALLOW_ACTION = 1U,
    DENY_ACTION = 2U,
    PROMPT_ACTION = 3U,
    EXPIRE_NEVER = 0U,
    EXPIRE_SESSION = 1U,
    EXPIRE_TIME = 2U,
    EXPIRE_POLICY = 3U
  };

  /* void add (in nsIURI uri, in string type, in uint32_t permission, [optional] in uint32_t expireType, [optional] in int64_t expireTime); */
  NS_IMETHOD Add(nsIURI *uri, const char * type, uint32_t permission, uint32_t expireType, int64_t expireTime) = 0;

  /* nsISimpleEnumerator getAllForURI (in nsIURI uri); */
  NS_IMETHOD GetAllForURI(nsIURI *uri, nsISimpleEnumerator **_retval) = 0;

  /* nsISimpleEnumerator getAllForPrincipal (in nsIPrincipal principal); */
  NS_IMETHOD GetAllForPrincipal(nsIPrincipal *principal, nsISimpleEnumerator **_retval) = 0;

  /* void addFromPrincipal (in nsIPrincipal principal, in string typed, in uint32_t permission, [optional] in uint32_t expireType, [optional] in int64_t expireTime); */
  NS_IMETHOD AddFromPrincipal(nsIPrincipal *principal, const char * typed, uint32_t permission, uint32_t expireType, int64_t expireTime) = 0;

  /* void remove (in nsIURI uri, in string type); */
  NS_IMETHOD Remove(nsIURI *uri, const char * type) = 0;

  /* void removeFromPrincipal (in nsIPrincipal principal, in string type); */
  NS_IMETHOD RemoveFromPrincipal(nsIPrincipal *principal, const char * type) = 0;

  /* void removePermission (in nsIPermission perm); */
  NS_IMETHOD RemovePermission(nsIPermission *perm) = 0;

  /* void removeAll (); */
  NS_IMETHOD RemoveAll(void) = 0;

  /* void removeAllSince (in int64_t since); */
  NS_IMETHOD RemoveAllSince(int64_t since) = 0;

  /* void removeByType (in string type); */
  NS_IMETHOD RemoveByType(const char * type) = 0;

  /* uint32_t testPermission (in nsIURI uri, in string type); */
  NS_IMETHOD TestPermission(nsIURI *uri, const char * type, uint32_t *_retval) = 0;

  /* uint32_t testPermissionFromPrincipal (in nsIPrincipal principal, in string type); */
  NS_IMETHOD TestPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) = 0;

  /* uint32_t testPermissionFromWindow (in mozIDOMWindow window, in string type); */
  NS_IMETHOD TestPermissionFromWindow(mozIDOMWindow *window, const char * type, uint32_t *_retval) = 0;

  /* uint32_t testExactPermission (in nsIURI uri, in string type); */
  NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, uint32_t *_retval) = 0;

  /* uint32_t testExactPermissionFromPrincipal (in nsIPrincipal principal, in string type); */
  NS_IMETHOD TestExactPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) = 0;

  /* uint32_t testExactPermanentPermission (in nsIPrincipal principal, in string type); */
  NS_IMETHOD TestExactPermanentPermission(nsIPrincipal *principal, const char * type, uint32_t *_retval) = 0;

  /* nsIPermission getPermissionObjectForURI (in nsIURI uri, in string type, in boolean exactHost); */
  NS_IMETHOD GetPermissionObjectForURI(nsIURI *uri, const char * type, bool exactHost, nsIPermission **_retval) = 0;

  /* nsIPermission getPermissionObject (in nsIPrincipal principal, in string type, in boolean exactHost); */
  NS_IMETHOD GetPermissionObject(nsIPrincipal *principal, const char * type, bool exactHost, nsIPermission **_retval) = 0;

  /* readonly attribute nsISimpleEnumerator enumerator; */
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **aEnumerator) = 0;

  /* void removePermissionsWithAttributes (in DOMString patternAsJSON); */
  NS_IMETHOD RemovePermissionsWithAttributes(const nsAString& patternAsJSON) = 0;

  /* void updateExpireTime (in nsIPrincipal principal, in string type, in boolean exactHost, in uint64_t sessionExpireTime, in uint64_t persistentExpireTime); */
  NS_IMETHOD UpdateExpireTime(nsIPrincipal *principal, const char * type, bool exactHost, uint64_t sessionExpireTime, uint64_t persistentExpireTime) = 0;

  /* void getPermissionsWithKey (in ACString permissionKey, out IPCPermissionArrayRef perms); */
  NS_IMETHOD GetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) = 0;

  /* void setPermissionsWithKey (in ACString permissionKey, in IPCPermissionArrayRef perms); */
  NS_IMETHOD SetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) = 0;

  /* void broadcastPermissionsForPrincipalToAllContentProcesses (in nsIPrincipal aPrincipal); */
  NS_IMETHOD BroadcastPermissionsForPrincipalToAllContentProcesses(nsIPrincipal *aPrincipal) = 0;

  /* void whenPermissionsAvailable (in nsIPrincipal aPrincipal, in nsIRunnable aRunnable); */
  NS_IMETHOD WhenPermissionsAvailable(nsIPrincipal *aPrincipal, nsIRunnable *aRunnable) = 0;

  /* [infallible] readonly attribute boolean hasPreloadPermissions; */
  NS_IMETHOD GetHasPreloadPermissions(bool *aHasPreloadPermissions) = 0;
  inline bool GetHasPreloadPermissions()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasPreloadPermissions(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPermissionManager, NS_IPERMISSIONMANAGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPERMISSIONMANAGER \
  NS_IMETHOD Add(nsIURI *uri, const char * type, uint32_t permission, uint32_t expireType, int64_t expireTime) override; \
  NS_IMETHOD GetAllForURI(nsIURI *uri, nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD GetAllForPrincipal(nsIPrincipal *principal, nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD AddFromPrincipal(nsIPrincipal *principal, const char * typed, uint32_t permission, uint32_t expireType, int64_t expireTime) override; \
  NS_IMETHOD Remove(nsIURI *uri, const char * type) override; \
  NS_IMETHOD RemoveFromPrincipal(nsIPrincipal *principal, const char * type) override; \
  NS_IMETHOD RemovePermission(nsIPermission *perm) override; \
  NS_IMETHOD RemoveAll(void) override; \
  NS_IMETHOD RemoveAllSince(int64_t since) override; \
  NS_IMETHOD RemoveByType(const char * type) override; \
  NS_IMETHOD TestPermission(nsIURI *uri, const char * type, uint32_t *_retval) override; \
  NS_IMETHOD TestPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) override; \
  NS_IMETHOD TestPermissionFromWindow(mozIDOMWindow *window, const char * type, uint32_t *_retval) override; \
  NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, uint32_t *_retval) override; \
  NS_IMETHOD TestExactPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) override; \
  NS_IMETHOD TestExactPermanentPermission(nsIPrincipal *principal, const char * type, uint32_t *_retval) override; \
  NS_IMETHOD GetPermissionObjectForURI(nsIURI *uri, const char * type, bool exactHost, nsIPermission **_retval) override; \
  NS_IMETHOD GetPermissionObject(nsIPrincipal *principal, const char * type, bool exactHost, nsIPermission **_retval) override; \
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **aEnumerator) override; \
  NS_IMETHOD RemovePermissionsWithAttributes(const nsAString& patternAsJSON) override; \
  NS_IMETHOD UpdateExpireTime(nsIPrincipal *principal, const char * type, bool exactHost, uint64_t sessionExpireTime, uint64_t persistentExpireTime) override; \
  NS_IMETHOD GetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) override; \
  NS_IMETHOD SetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) override; \
  NS_IMETHOD BroadcastPermissionsForPrincipalToAllContentProcesses(nsIPrincipal *aPrincipal) override; \
  NS_IMETHOD WhenPermissionsAvailable(nsIPrincipal *aPrincipal, nsIRunnable *aRunnable) override; \
  using nsIPermissionManager::GetHasPreloadPermissions; \
  NS_IMETHOD GetHasPreloadPermissions(bool *aHasPreloadPermissions) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPERMISSIONMANAGER \
  nsresult Add(nsIURI *uri, const char * type, uint32_t permission, uint32_t expireType, int64_t expireTime); \
  nsresult GetAllForURI(nsIURI *uri, nsISimpleEnumerator **_retval); \
  nsresult GetAllForPrincipal(nsIPrincipal *principal, nsISimpleEnumerator **_retval); \
  nsresult AddFromPrincipal(nsIPrincipal *principal, const char * typed, uint32_t permission, uint32_t expireType, int64_t expireTime); \
  nsresult Remove(nsIURI *uri, const char * type); \
  nsresult RemoveFromPrincipal(nsIPrincipal *principal, const char * type); \
  nsresult RemovePermission(nsIPermission *perm); \
  nsresult RemoveAll(void); \
  nsresult RemoveAllSince(int64_t since); \
  nsresult RemoveByType(const char * type); \
  nsresult TestPermission(nsIURI *uri, const char * type, uint32_t *_retval); \
  nsresult TestPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval); \
  nsresult TestPermissionFromWindow(mozIDOMWindow *window, const char * type, uint32_t *_retval); \
  nsresult TestExactPermission(nsIURI *uri, const char * type, uint32_t *_retval); \
  nsresult TestExactPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval); \
  nsresult TestExactPermanentPermission(nsIPrincipal *principal, const char * type, uint32_t *_retval); \
  nsresult GetPermissionObjectForURI(nsIURI *uri, const char * type, bool exactHost, nsIPermission **_retval); \
  nsresult GetPermissionObject(nsIPrincipal *principal, const char * type, bool exactHost, nsIPermission **_retval); \
  nsresult GetEnumerator(nsISimpleEnumerator **aEnumerator); \
  nsresult RemovePermissionsWithAttributes(const nsAString& patternAsJSON); \
  nsresult UpdateExpireTime(nsIPrincipal *principal, const char * type, bool exactHost, uint64_t sessionExpireTime, uint64_t persistentExpireTime); \
  nsresult GetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms); \
  nsresult SetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms); \
  nsresult BroadcastPermissionsForPrincipalToAllContentProcesses(nsIPrincipal *aPrincipal); \
  nsresult WhenPermissionsAvailable(nsIPrincipal *aPrincipal, nsIRunnable *aRunnable); \
  using nsIPermissionManager::GetHasPreloadPermissions; \
  nsresult GetHasPreloadPermissions(bool *aHasPreloadPermissions); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPERMISSIONMANAGER(_to) \
  NS_IMETHOD Add(nsIURI *uri, const char * type, uint32_t permission, uint32_t expireType, int64_t expireTime) override { return _to Add(uri, type, permission, expireType, expireTime); } \
  NS_IMETHOD GetAllForURI(nsIURI *uri, nsISimpleEnumerator **_retval) override { return _to GetAllForURI(uri, _retval); } \
  NS_IMETHOD GetAllForPrincipal(nsIPrincipal *principal, nsISimpleEnumerator **_retval) override { return _to GetAllForPrincipal(principal, _retval); } \
  NS_IMETHOD AddFromPrincipal(nsIPrincipal *principal, const char * typed, uint32_t permission, uint32_t expireType, int64_t expireTime) override { return _to AddFromPrincipal(principal, typed, permission, expireType, expireTime); } \
  NS_IMETHOD Remove(nsIURI *uri, const char * type) override { return _to Remove(uri, type); } \
  NS_IMETHOD RemoveFromPrincipal(nsIPrincipal *principal, const char * type) override { return _to RemoveFromPrincipal(principal, type); } \
  NS_IMETHOD RemovePermission(nsIPermission *perm) override { return _to RemovePermission(perm); } \
  NS_IMETHOD RemoveAll(void) override { return _to RemoveAll(); } \
  NS_IMETHOD RemoveAllSince(int64_t since) override { return _to RemoveAllSince(since); } \
  NS_IMETHOD RemoveByType(const char * type) override { return _to RemoveByType(type); } \
  NS_IMETHOD TestPermission(nsIURI *uri, const char * type, uint32_t *_retval) override { return _to TestPermission(uri, type, _retval); } \
  NS_IMETHOD TestPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) override { return _to TestPermissionFromPrincipal(principal, type, _retval); } \
  NS_IMETHOD TestPermissionFromWindow(mozIDOMWindow *window, const char * type, uint32_t *_retval) override { return _to TestPermissionFromWindow(window, type, _retval); } \
  NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, uint32_t *_retval) override { return _to TestExactPermission(uri, type, _retval); } \
  NS_IMETHOD TestExactPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) override { return _to TestExactPermissionFromPrincipal(principal, type, _retval); } \
  NS_IMETHOD TestExactPermanentPermission(nsIPrincipal *principal, const char * type, uint32_t *_retval) override { return _to TestExactPermanentPermission(principal, type, _retval); } \
  NS_IMETHOD GetPermissionObjectForURI(nsIURI *uri, const char * type, bool exactHost, nsIPermission **_retval) override { return _to GetPermissionObjectForURI(uri, type, exactHost, _retval); } \
  NS_IMETHOD GetPermissionObject(nsIPrincipal *principal, const char * type, bool exactHost, nsIPermission **_retval) override { return _to GetPermissionObject(principal, type, exactHost, _retval); } \
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **aEnumerator) override { return _to GetEnumerator(aEnumerator); } \
  NS_IMETHOD RemovePermissionsWithAttributes(const nsAString& patternAsJSON) override { return _to RemovePermissionsWithAttributes(patternAsJSON); } \
  NS_IMETHOD UpdateExpireTime(nsIPrincipal *principal, const char * type, bool exactHost, uint64_t sessionExpireTime, uint64_t persistentExpireTime) override { return _to UpdateExpireTime(principal, type, exactHost, sessionExpireTime, persistentExpireTime); } \
  NS_IMETHOD GetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) override { return _to GetPermissionsWithKey(permissionKey, perms); } \
  NS_IMETHOD SetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) override { return _to SetPermissionsWithKey(permissionKey, perms); } \
  NS_IMETHOD BroadcastPermissionsForPrincipalToAllContentProcesses(nsIPrincipal *aPrincipal) override { return _to BroadcastPermissionsForPrincipalToAllContentProcesses(aPrincipal); } \
  NS_IMETHOD WhenPermissionsAvailable(nsIPrincipal *aPrincipal, nsIRunnable *aRunnable) override { return _to WhenPermissionsAvailable(aPrincipal, aRunnable); } \
  using nsIPermissionManager::GetHasPreloadPermissions; \
  NS_IMETHOD GetHasPreloadPermissions(bool *aHasPreloadPermissions) override { return _to GetHasPreloadPermissions(aHasPreloadPermissions); } 

/* 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(nsIURI *uri, const char * type, uint32_t permission, uint32_t expireType, int64_t expireTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(uri, type, permission, expireType, expireTime); } \
  NS_IMETHOD GetAllForURI(nsIURI *uri, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllForURI(uri, _retval); } \
  NS_IMETHOD GetAllForPrincipal(nsIPrincipal *principal, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllForPrincipal(principal, _retval); } \
  NS_IMETHOD AddFromPrincipal(nsIPrincipal *principal, const char * typed, uint32_t permission, uint32_t expireType, int64_t expireTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddFromPrincipal(principal, typed, permission, expireType, expireTime); } \
  NS_IMETHOD Remove(nsIURI *uri, const char * type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(uri, type); } \
  NS_IMETHOD RemoveFromPrincipal(nsIPrincipal *principal, const char * type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveFromPrincipal(principal, type); } \
  NS_IMETHOD RemovePermission(nsIPermission *perm) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePermission(perm); } \
  NS_IMETHOD RemoveAll(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \
  NS_IMETHOD RemoveAllSince(int64_t since) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAllSince(since); } \
  NS_IMETHOD RemoveByType(const char * type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveByType(type); } \
  NS_IMETHOD TestPermission(nsIURI *uri, const char * type, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestPermission(uri, type, _retval); } \
  NS_IMETHOD TestPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestPermissionFromPrincipal(principal, type, _retval); } \
  NS_IMETHOD TestPermissionFromWindow(mozIDOMWindow *window, const char * type, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestPermissionFromWindow(window, type, _retval); } \
  NS_IMETHOD TestExactPermission(nsIURI *uri, const char * type, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestExactPermission(uri, type, _retval); } \
  NS_IMETHOD TestExactPermissionFromPrincipal(nsIPrincipal *principal, const char * type, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestExactPermissionFromPrincipal(principal, type, _retval); } \
  NS_IMETHOD TestExactPermanentPermission(nsIPrincipal *principal, const char * type, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestExactPermanentPermission(principal, type, _retval); } \
  NS_IMETHOD GetPermissionObjectForURI(nsIURI *uri, const char * type, bool exactHost, nsIPermission **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissionObjectForURI(uri, type, exactHost, _retval); } \
  NS_IMETHOD GetPermissionObject(nsIPrincipal *principal, const char * type, bool exactHost, nsIPermission **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissionObject(principal, type, exactHost, _retval); } \
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **aEnumerator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \
  NS_IMETHOD RemovePermissionsWithAttributes(const nsAString& patternAsJSON) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePermissionsWithAttributes(patternAsJSON); } \
  NS_IMETHOD UpdateExpireTime(nsIPrincipal *principal, const char * type, bool exactHost, uint64_t sessionExpireTime, uint64_t persistentExpireTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateExpireTime(principal, type, exactHost, sessionExpireTime, persistentExpireTime); } \
  NS_IMETHOD GetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissionsWithKey(permissionKey, perms); } \
  NS_IMETHOD SetPermissionsWithKey(const nsACString& permissionKey, nsTArray<IPC::Permission> & perms) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPermissionsWithKey(permissionKey, perms); } \
  NS_IMETHOD BroadcastPermissionsForPrincipalToAllContentProcesses(nsIPrincipal *aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BroadcastPermissionsForPrincipalToAllContentProcesses(aPrincipal); } \
  NS_IMETHOD WhenPermissionsAvailable(nsIPrincipal *aPrincipal, nsIRunnable *aRunnable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WhenPermissionsAvailable(aPrincipal, aRunnable); } \
  NS_IMETHOD GetHasPreloadPermissions(bool *aHasPreloadPermissions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasPreloadPermissions(aHasPreloadPermissions); } 

#define NS_PERMISSIONMANAGER_CONTRACTID "@mozilla.org/permissionmanager;1"
#define PERM_CHANGE_NOTIFICATION "perm-changed"

#endif /* __gen_nsIPermissionManager_h__ */