Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIPermission.idl
3 : */
4 :
5 : #ifndef __gen_nsIPermission_h__
6 : #define __gen_nsIPermission_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIPrincipal; /* forward declaration */
18 :
19 : class nsIURI; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIPermission */
23 : #define NS_IPERMISSION_IID_STR "bb409a51-2371-4fea-9dc9-b7286a458b8c"
24 :
25 : #define NS_IPERMISSION_IID \
26 : {0xbb409a51, 0x2371, 0x4fea, \
27 : { 0x9d, 0xc9, 0xb7, 0x28, 0x6a, 0x45, 0x8b, 0x8c }}
28 :
29 14 : class NS_NO_VTABLE nsIPermission : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERMISSION_IID)
33 :
34 : /* readonly attribute nsIPrincipal principal; */
35 : NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) = 0;
36 :
37 : /* readonly attribute ACString type; */
38 : NS_IMETHOD GetType(nsACString & aType) = 0;
39 :
40 : /* readonly attribute uint32_t capability; */
41 : NS_IMETHOD GetCapability(uint32_t *aCapability) = 0;
42 :
43 : /* readonly attribute uint32_t expireType; */
44 : NS_IMETHOD GetExpireType(uint32_t *aExpireType) = 0;
45 :
46 : /* readonly attribute int64_t expireTime; */
47 : NS_IMETHOD GetExpireTime(int64_t *aExpireTime) = 0;
48 :
49 : /* boolean matches (in nsIPrincipal principal, in boolean exactHost); */
50 : NS_IMETHOD Matches(nsIPrincipal *principal, bool exactHost, bool *_retval) = 0;
51 :
52 : /* boolean matchesURI (in nsIURI uri, in boolean exactHost); */
53 : NS_IMETHOD MatchesURI(nsIURI *uri, bool exactHost, bool *_retval) = 0;
54 :
55 : };
56 :
57 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIPermission, NS_IPERMISSION_IID)
58 :
59 : /* Use this macro when declaring classes that implement this interface. */
60 : #define NS_DECL_NSIPERMISSION \
61 : NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) override; \
62 : NS_IMETHOD GetType(nsACString & aType) override; \
63 : NS_IMETHOD GetCapability(uint32_t *aCapability) override; \
64 : NS_IMETHOD GetExpireType(uint32_t *aExpireType) override; \
65 : NS_IMETHOD GetExpireTime(int64_t *aExpireTime) override; \
66 : NS_IMETHOD Matches(nsIPrincipal *principal, bool exactHost, bool *_retval) override; \
67 : NS_IMETHOD MatchesURI(nsIURI *uri, bool exactHost, bool *_retval) override;
68 :
69 : /* Use this macro when declaring the members of this interface when the
70 : class doesn't implement the interface. This is useful for forwarding. */
71 : #define NS_DECL_NON_VIRTUAL_NSIPERMISSION \
72 : nsresult GetPrincipal(nsIPrincipal * *aPrincipal); \
73 : nsresult GetType(nsACString & aType); \
74 : nsresult GetCapability(uint32_t *aCapability); \
75 : nsresult GetExpireType(uint32_t *aExpireType); \
76 : nsresult GetExpireTime(int64_t *aExpireTime); \
77 : nsresult Matches(nsIPrincipal *principal, bool exactHost, bool *_retval); \
78 : nsresult MatchesURI(nsIURI *uri, bool exactHost, bool *_retval);
79 :
80 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
81 : #define NS_FORWARD_NSIPERMISSION(_to) \
82 : NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) override { return _to GetPrincipal(aPrincipal); } \
83 : NS_IMETHOD GetType(nsACString & aType) override { return _to GetType(aType); } \
84 : NS_IMETHOD GetCapability(uint32_t *aCapability) override { return _to GetCapability(aCapability); } \
85 : NS_IMETHOD GetExpireType(uint32_t *aExpireType) override { return _to GetExpireType(aExpireType); } \
86 : NS_IMETHOD GetExpireTime(int64_t *aExpireTime) override { return _to GetExpireTime(aExpireTime); } \
87 : NS_IMETHOD Matches(nsIPrincipal *principal, bool exactHost, bool *_retval) override { return _to Matches(principal, exactHost, _retval); } \
88 : NS_IMETHOD MatchesURI(nsIURI *uri, bool exactHost, bool *_retval) override { return _to MatchesURI(uri, exactHost, _retval); }
89 :
90 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
91 : #define NS_FORWARD_SAFE_NSIPERMISSION(_to) \
92 : NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrincipal(aPrincipal); } \
93 : NS_IMETHOD GetType(nsACString & aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
94 : NS_IMETHOD GetCapability(uint32_t *aCapability) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCapability(aCapability); } \
95 : NS_IMETHOD GetExpireType(uint32_t *aExpireType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpireType(aExpireType); } \
96 : NS_IMETHOD GetExpireTime(int64_t *aExpireTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpireTime(aExpireTime); } \
97 : NS_IMETHOD Matches(nsIPrincipal *principal, bool exactHost, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Matches(principal, exactHost, _retval); } \
98 : NS_IMETHOD MatchesURI(nsIURI *uri, bool exactHost, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MatchesURI(uri, exactHost, _retval); }
99 :
100 : #if 0
101 : /* Use the code below as a template for the implementation class for this interface. */
102 :
103 : /* Header file */
104 : class nsPermission : public nsIPermission
105 : {
106 : public:
107 : NS_DECL_ISUPPORTS
108 : NS_DECL_NSIPERMISSION
109 :
110 : nsPermission();
111 :
112 : private:
113 : ~nsPermission();
114 :
115 : protected:
116 : /* additional members */
117 : };
118 :
119 : /* Implementation file */
120 : NS_IMPL_ISUPPORTS(nsPermission, nsIPermission)
121 :
122 : nsPermission::nsPermission()
123 : {
124 : /* member initializers and constructor code */
125 : }
126 :
127 : nsPermission::~nsPermission()
128 : {
129 : /* destructor code */
130 : }
131 :
132 : /* readonly attribute nsIPrincipal principal; */
133 : NS_IMETHODIMP nsPermission::GetPrincipal(nsIPrincipal * *aPrincipal)
134 : {
135 : return NS_ERROR_NOT_IMPLEMENTED;
136 : }
137 :
138 : /* readonly attribute ACString type; */
139 : NS_IMETHODIMP nsPermission::GetType(nsACString & aType)
140 : {
141 : return NS_ERROR_NOT_IMPLEMENTED;
142 : }
143 :
144 : /* readonly attribute uint32_t capability; */
145 : NS_IMETHODIMP nsPermission::GetCapability(uint32_t *aCapability)
146 : {
147 : return NS_ERROR_NOT_IMPLEMENTED;
148 : }
149 :
150 : /* readonly attribute uint32_t expireType; */
151 : NS_IMETHODIMP nsPermission::GetExpireType(uint32_t *aExpireType)
152 : {
153 : return NS_ERROR_NOT_IMPLEMENTED;
154 : }
155 :
156 : /* readonly attribute int64_t expireTime; */
157 : NS_IMETHODIMP nsPermission::GetExpireTime(int64_t *aExpireTime)
158 : {
159 : return NS_ERROR_NOT_IMPLEMENTED;
160 : }
161 :
162 : /* boolean matches (in nsIPrincipal principal, in boolean exactHost); */
163 : NS_IMETHODIMP nsPermission::Matches(nsIPrincipal *principal, bool exactHost, bool *_retval)
164 : {
165 : return NS_ERROR_NOT_IMPLEMENTED;
166 : }
167 :
168 : /* boolean matchesURI (in nsIURI uri, in boolean exactHost); */
169 : NS_IMETHODIMP nsPermission::MatchesURI(nsIURI *uri, bool exactHost, bool *_retval)
170 : {
171 : return NS_ERROR_NOT_IMPLEMENTED;
172 : }
173 :
174 : /* End of implementation class template. */
175 : #endif
176 :
177 :
178 : #endif /* __gen_nsIPermission_h__ */
|