1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/security/manager/ssl/public/nsIKeyModule.idl
3 : */
4 :
5 : #ifndef __gen_nsIKeyModule_h__
6 : #define __gen_nsIKeyModule_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 :
18 : /* starting interface: nsIKeyObject */
19 : #define NS_IKEYOBJECT_IID_STR "4b31f4ed-9424-4710-b946-79b7e33cf3a8"
20 :
21 : #define NS_IKEYOBJECT_IID \
22 : {0x4b31f4ed, 0x9424, 0x4710, \
23 : { 0xb9, 0x46, 0x79, 0xb7, 0xe3, 0x3c, 0xf3, 0xa8 }}
24 :
25 1676 : class NS_NO_VTABLE NS_SCRIPTABLE nsIKeyObject : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IKEYOBJECT_IID)
29 :
30 : enum {
31 : SYM_KEY = 1,
32 : PRIVATE_KEY = 2,
33 : PUBLIC_KEY = 3,
34 : RC4 = 1,
35 : AES_CBC = 2,
36 : HMAC = 257
37 : };
38 :
39 : /* [noscript] void initKey (in short aAlgorithm, in voidPtr aKey); */
40 : NS_IMETHOD InitKey(PRInt16 aAlgorithm, void *aKey) = 0;
41 :
42 : /* [noscript] voidPtr getKeyObj (); */
43 : NS_IMETHOD GetKeyObj(void **_retval NS_OUTPARAM) = 0;
44 :
45 : /* short getType (); */
46 : NS_SCRIPTABLE NS_IMETHOD GetType(PRInt16 *_retval NS_OUTPARAM) = 0;
47 :
48 : };
49 :
50 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIKeyObject, NS_IKEYOBJECT_IID)
51 :
52 : /* Use this macro when declaring classes that implement this interface. */
53 : #define NS_DECL_NSIKEYOBJECT \
54 : NS_IMETHOD InitKey(PRInt16 aAlgorithm, void *aKey); \
55 : NS_IMETHOD GetKeyObj(void **_retval NS_OUTPARAM); \
56 : NS_SCRIPTABLE NS_IMETHOD GetType(PRInt16 *_retval NS_OUTPARAM);
57 :
58 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
59 : #define NS_FORWARD_NSIKEYOBJECT(_to) \
60 : NS_IMETHOD InitKey(PRInt16 aAlgorithm, void *aKey) { return _to InitKey(aAlgorithm, aKey); } \
61 : NS_IMETHOD GetKeyObj(void **_retval NS_OUTPARAM) { return _to GetKeyObj(_retval); } \
62 : NS_SCRIPTABLE NS_IMETHOD GetType(PRInt16 *_retval NS_OUTPARAM) { return _to GetType(_retval); }
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
65 : #define NS_FORWARD_SAFE_NSIKEYOBJECT(_to) \
66 : NS_IMETHOD InitKey(PRInt16 aAlgorithm, void *aKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitKey(aAlgorithm, aKey); } \
67 : NS_IMETHOD GetKeyObj(void **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyObj(_retval); } \
68 : NS_SCRIPTABLE NS_IMETHOD GetType(PRInt16 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(_retval); }
69 :
70 : #if 0
71 : /* Use the code below as a template for the implementation class for this interface. */
72 :
73 : /* Header file */
74 : class nsKeyObject : public nsIKeyObject
75 : {
76 : public:
77 : NS_DECL_ISUPPORTS
78 : NS_DECL_NSIKEYOBJECT
79 :
80 : nsKeyObject();
81 :
82 : private:
83 : ~nsKeyObject();
84 :
85 : protected:
86 : /* additional members */
87 : };
88 :
89 : /* Implementation file */
90 : NS_IMPL_ISUPPORTS1(nsKeyObject, nsIKeyObject)
91 :
92 : nsKeyObject::nsKeyObject()
93 : {
94 : /* member initializers and constructor code */
95 : }
96 :
97 : nsKeyObject::~nsKeyObject()
98 : {
99 : /* destructor code */
100 : }
101 :
102 : /* [noscript] void initKey (in short aAlgorithm, in voidPtr aKey); */
103 : NS_IMETHODIMP nsKeyObject::InitKey(PRInt16 aAlgorithm, void *aKey)
104 : {
105 : return NS_ERROR_NOT_IMPLEMENTED;
106 : }
107 :
108 : /* [noscript] voidPtr getKeyObj (); */
109 : NS_IMETHODIMP nsKeyObject::GetKeyObj(void **_retval NS_OUTPARAM)
110 : {
111 : return NS_ERROR_NOT_IMPLEMENTED;
112 : }
113 :
114 : /* short getType (); */
115 : NS_IMETHODIMP nsKeyObject::GetType(PRInt16 *_retval NS_OUTPARAM)
116 : {
117 : return NS_ERROR_NOT_IMPLEMENTED;
118 : }
119 :
120 : /* End of implementation class template. */
121 : #endif
122 :
123 :
124 : /* starting interface: nsIKeyObjectFactory */
125 : #define NS_IKEYOBJECTFACTORY_IID_STR "264eb54d-e20d-49a0-890c-1a5986ea81c4"
126 :
127 : #define NS_IKEYOBJECTFACTORY_IID \
128 : {0x264eb54d, 0xe20d, 0x49a0, \
129 : { 0x89, 0x0c, 0x1a, 0x59, 0x86, 0xea, 0x81, 0xc4 }}
130 :
131 38 : class NS_NO_VTABLE NS_SCRIPTABLE nsIKeyObjectFactory : public nsISupports {
132 : public:
133 :
134 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IKEYOBJECTFACTORY_IID)
135 :
136 : /* nsIKeyObject lookupKeyByName (in ACString aName); */
137 : NS_SCRIPTABLE NS_IMETHOD LookupKeyByName(const nsACString & aName, nsIKeyObject * *_retval NS_OUTPARAM) = 0;
138 :
139 : /* nsIKeyObject unwrapKey (in short aAlgorithm, [array, size_is (aWrappedKeyLen), const] in octet aWrappedKey, in unsigned long aWrappedKeyLen); */
140 : NS_SCRIPTABLE NS_IMETHOD UnwrapKey(PRInt16 aAlgorithm, const PRUint8 *aWrappedKey, PRUint32 aWrappedKeyLen, nsIKeyObject * *_retval NS_OUTPARAM) = 0;
141 :
142 : /* nsIKeyObject keyFromString (in short aAlgorithm, in ACString aKey); */
143 : NS_SCRIPTABLE NS_IMETHOD KeyFromString(PRInt16 aAlgorithm, const nsACString & aKey, nsIKeyObject * *_retval NS_OUTPARAM) = 0;
144 :
145 : };
146 :
147 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIKeyObjectFactory, NS_IKEYOBJECTFACTORY_IID)
148 :
149 : /* Use this macro when declaring classes that implement this interface. */
150 : #define NS_DECL_NSIKEYOBJECTFACTORY \
151 : NS_SCRIPTABLE NS_IMETHOD LookupKeyByName(const nsACString & aName, nsIKeyObject * *_retval NS_OUTPARAM); \
152 : NS_SCRIPTABLE NS_IMETHOD UnwrapKey(PRInt16 aAlgorithm, const PRUint8 *aWrappedKey, PRUint32 aWrappedKeyLen, nsIKeyObject * *_retval NS_OUTPARAM); \
153 : NS_SCRIPTABLE NS_IMETHOD KeyFromString(PRInt16 aAlgorithm, const nsACString & aKey, nsIKeyObject * *_retval NS_OUTPARAM);
154 :
155 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
156 : #define NS_FORWARD_NSIKEYOBJECTFACTORY(_to) \
157 : NS_SCRIPTABLE NS_IMETHOD LookupKeyByName(const nsACString & aName, nsIKeyObject * *_retval NS_OUTPARAM) { return _to LookupKeyByName(aName, _retval); } \
158 : NS_SCRIPTABLE NS_IMETHOD UnwrapKey(PRInt16 aAlgorithm, const PRUint8 *aWrappedKey, PRUint32 aWrappedKeyLen, nsIKeyObject * *_retval NS_OUTPARAM) { return _to UnwrapKey(aAlgorithm, aWrappedKey, aWrappedKeyLen, _retval); } \
159 : NS_SCRIPTABLE NS_IMETHOD KeyFromString(PRInt16 aAlgorithm, const nsACString & aKey, nsIKeyObject * *_retval NS_OUTPARAM) { return _to KeyFromString(aAlgorithm, aKey, _retval); }
160 :
161 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
162 : #define NS_FORWARD_SAFE_NSIKEYOBJECTFACTORY(_to) \
163 : NS_SCRIPTABLE NS_IMETHOD LookupKeyByName(const nsACString & aName, nsIKeyObject * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->LookupKeyByName(aName, _retval); } \
164 : NS_SCRIPTABLE NS_IMETHOD UnwrapKey(PRInt16 aAlgorithm, const PRUint8 *aWrappedKey, PRUint32 aWrappedKeyLen, nsIKeyObject * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnwrapKey(aAlgorithm, aWrappedKey, aWrappedKeyLen, _retval); } \
165 : NS_SCRIPTABLE NS_IMETHOD KeyFromString(PRInt16 aAlgorithm, const nsACString & aKey, nsIKeyObject * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->KeyFromString(aAlgorithm, aKey, _retval); }
166 :
167 : #if 0
168 : /* Use the code below as a template for the implementation class for this interface. */
169 :
170 : /* Header file */
171 : class nsKeyObjectFactory : public nsIKeyObjectFactory
172 : {
173 : public:
174 : NS_DECL_ISUPPORTS
175 : NS_DECL_NSIKEYOBJECTFACTORY
176 :
177 : nsKeyObjectFactory();
178 :
179 : private:
180 : ~nsKeyObjectFactory();
181 :
182 : protected:
183 : /* additional members */
184 : };
185 :
186 : /* Implementation file */
187 : NS_IMPL_ISUPPORTS1(nsKeyObjectFactory, nsIKeyObjectFactory)
188 :
189 : nsKeyObjectFactory::nsKeyObjectFactory()
190 : {
191 : /* member initializers and constructor code */
192 : }
193 :
194 : nsKeyObjectFactory::~nsKeyObjectFactory()
195 : {
196 : /* destructor code */
197 : }
198 :
199 : /* nsIKeyObject lookupKeyByName (in ACString aName); */
200 : NS_IMETHODIMP nsKeyObjectFactory::LookupKeyByName(const nsACString & aName, nsIKeyObject * *_retval NS_OUTPARAM)
201 : {
202 : return NS_ERROR_NOT_IMPLEMENTED;
203 : }
204 :
205 : /* nsIKeyObject unwrapKey (in short aAlgorithm, [array, size_is (aWrappedKeyLen), const] in octet aWrappedKey, in unsigned long aWrappedKeyLen); */
206 : NS_IMETHODIMP nsKeyObjectFactory::UnwrapKey(PRInt16 aAlgorithm, const PRUint8 *aWrappedKey, PRUint32 aWrappedKeyLen, nsIKeyObject * *_retval NS_OUTPARAM)
207 : {
208 : return NS_ERROR_NOT_IMPLEMENTED;
209 : }
210 :
211 : /* nsIKeyObject keyFromString (in short aAlgorithm, in ACString aKey); */
212 : NS_IMETHODIMP nsKeyObjectFactory::KeyFromString(PRInt16 aAlgorithm, const nsACString & aKey, nsIKeyObject * *_retval NS_OUTPARAM)
213 : {
214 : return NS_ERROR_NOT_IMPLEMENTED;
215 : }
216 :
217 : /* End of implementation class template. */
218 : #endif
219 :
220 :
221 : #endif /* __gen_nsIKeyModule_h__ */
|