Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIDataSignatureVerifier.idl
3 : */
4 :
5 : #ifndef __gen_nsIDataSignatureVerifier_h__
6 : #define __gen_nsIDataSignatureVerifier_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 nsIX509Cert; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsIDataSignatureVerifier */
21 : #define NS_IDATASIGNATUREVERIFIER_IID_STR "94066a00-37c9-11e4-916c-0800200c9a66"
22 :
23 : #define NS_IDATASIGNATUREVERIFIER_IID \
24 : {0x94066a00, 0x37c9, 0x11e4, \
25 : { 0x91, 0x6c, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }}
26 :
27 0 : class NS_NO_VTABLE nsIDataSignatureVerifier : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATASIGNATUREVERIFIER_IID)
31 :
32 : /* [must_use] boolean verifyData (in ACString aData, in ACString aSignature, in ACString aPublicKey); */
33 : MOZ_MUST_USE NS_IMETHOD VerifyData(const nsACString & aData, const nsACString & aSignature, const nsACString & aPublicKey, bool *_retval) = 0;
34 :
35 : enum {
36 : VERIFY_OK = 0,
37 : VERIFY_ERROR_UNKNOWN_ISSUER = 1,
38 : VERIFY_ERROR_OTHER = 2
39 : };
40 :
41 : /* [must_use] nsIX509Cert verifySignature (in ACString signature, in ACString plaintext, out long errorCode); */
42 : MOZ_MUST_USE NS_IMETHOD VerifySignature(const nsACString & signature, const nsACString & plaintext, int32_t *errorCode, nsIX509Cert * *_retval) = 0;
43 :
44 : };
45 :
46 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDataSignatureVerifier, NS_IDATASIGNATUREVERIFIER_IID)
47 :
48 : /* Use this macro when declaring classes that implement this interface. */
49 : #define NS_DECL_NSIDATASIGNATUREVERIFIER \
50 : MOZ_MUST_USE NS_IMETHOD VerifyData(const nsACString & aData, const nsACString & aSignature, const nsACString & aPublicKey, bool *_retval) override; \
51 : MOZ_MUST_USE NS_IMETHOD VerifySignature(const nsACString & signature, const nsACString & plaintext, int32_t *errorCode, nsIX509Cert * *_retval) override;
52 :
53 : /* Use this macro when declaring the members of this interface when the
54 : class doesn't implement the interface. This is useful for forwarding. */
55 : #define NS_DECL_NON_VIRTUAL_NSIDATASIGNATUREVERIFIER \
56 : MOZ_MUST_USE nsresult VerifyData(const nsACString & aData, const nsACString & aSignature, const nsACString & aPublicKey, bool *_retval); \
57 : MOZ_MUST_USE nsresult VerifySignature(const nsACString & signature, const nsACString & plaintext, int32_t *errorCode, nsIX509Cert * *_retval);
58 :
59 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
60 : #define NS_FORWARD_NSIDATASIGNATUREVERIFIER(_to) \
61 : MOZ_MUST_USE NS_IMETHOD VerifyData(const nsACString & aData, const nsACString & aSignature, const nsACString & aPublicKey, bool *_retval) override { return _to VerifyData(aData, aSignature, aPublicKey, _retval); } \
62 : MOZ_MUST_USE NS_IMETHOD VerifySignature(const nsACString & signature, const nsACString & plaintext, int32_t *errorCode, nsIX509Cert * *_retval) override { return _to VerifySignature(signature, plaintext, errorCode, _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_NSIDATASIGNATUREVERIFIER(_to) \
66 : MOZ_MUST_USE NS_IMETHOD VerifyData(const nsACString & aData, const nsACString & aSignature, const nsACString & aPublicKey, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifyData(aData, aSignature, aPublicKey, _retval); } \
67 : MOZ_MUST_USE NS_IMETHOD VerifySignature(const nsACString & signature, const nsACString & plaintext, int32_t *errorCode, nsIX509Cert * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifySignature(signature, plaintext, errorCode, _retval); }
68 :
69 : #if 0
70 : /* Use the code below as a template for the implementation class for this interface. */
71 :
72 : /* Header file */
73 : class nsDataSignatureVerifier : public nsIDataSignatureVerifier
74 : {
75 : public:
76 : NS_DECL_ISUPPORTS
77 : NS_DECL_NSIDATASIGNATUREVERIFIER
78 :
79 : nsDataSignatureVerifier();
80 :
81 : private:
82 : ~nsDataSignatureVerifier();
83 :
84 : protected:
85 : /* additional members */
86 : };
87 :
88 : /* Implementation file */
89 : NS_IMPL_ISUPPORTS(nsDataSignatureVerifier, nsIDataSignatureVerifier)
90 :
91 : nsDataSignatureVerifier::nsDataSignatureVerifier()
92 : {
93 : /* member initializers and constructor code */
94 : }
95 :
96 : nsDataSignatureVerifier::~nsDataSignatureVerifier()
97 : {
98 : /* destructor code */
99 : }
100 :
101 : /* [must_use] boolean verifyData (in ACString aData, in ACString aSignature, in ACString aPublicKey); */
102 : MOZ_MUST_USE NS_IMETHODIMP nsDataSignatureVerifier::VerifyData(const nsACString & aData, const nsACString & aSignature, const nsACString & aPublicKey, bool *_retval)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* [must_use] nsIX509Cert verifySignature (in ACString signature, in ACString plaintext, out long errorCode); */
108 : MOZ_MUST_USE NS_IMETHODIMP nsDataSignatureVerifier::VerifySignature(const nsACString & signature, const nsACString & plaintext, int32_t *errorCode, nsIX509Cert * *_retval)
109 : {
110 : return NS_ERROR_NOT_IMPLEMENTED;
111 : }
112 :
113 : /* End of implementation class template. */
114 : #endif
115 :
116 :
117 : #endif /* __gen_nsIDataSignatureVerifier_h__ */
|