Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIRandomGenerator.idl
3 : */
4 :
5 : #ifndef __gen_nsIRandomGenerator_h__
6 : #define __gen_nsIRandomGenerator_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: nsIRandomGenerator */
19 : #define NS_IRANDOMGENERATOR_IID_STR "2362d97a-747a-4576-8863-697667309209"
20 :
21 : #define NS_IRANDOMGENERATOR_IID \
22 : {0x2362d97a, 0x747a, 0x4576, \
23 : { 0x88, 0x63, 0x69, 0x76, 0x67, 0x30, 0x92, 0x09 }}
24 :
25 0 : class NS_NO_VTABLE nsIRandomGenerator : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRANDOMGENERATOR_IID)
29 :
30 : /* void generateRandomBytes (in unsigned long aLength, [array, size_is (aLength), retval] out octet aBuffer); */
31 : NS_IMETHOD GenerateRandomBytes(uint32_t aLength, uint8_t **aBuffer) = 0;
32 :
33 : };
34 :
35 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIRandomGenerator, NS_IRANDOMGENERATOR_IID)
36 :
37 : /* Use this macro when declaring classes that implement this interface. */
38 : #define NS_DECL_NSIRANDOMGENERATOR \
39 : NS_IMETHOD GenerateRandomBytes(uint32_t aLength, uint8_t **aBuffer) override;
40 :
41 : /* Use this macro when declaring the members of this interface when the
42 : class doesn't implement the interface. This is useful for forwarding. */
43 : #define NS_DECL_NON_VIRTUAL_NSIRANDOMGENERATOR \
44 : nsresult GenerateRandomBytes(uint32_t aLength, uint8_t **aBuffer);
45 :
46 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
47 : #define NS_FORWARD_NSIRANDOMGENERATOR(_to) \
48 : NS_IMETHOD GenerateRandomBytes(uint32_t aLength, uint8_t **aBuffer) override { return _to GenerateRandomBytes(aLength, aBuffer); }
49 :
50 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
51 : #define NS_FORWARD_SAFE_NSIRANDOMGENERATOR(_to) \
52 : NS_IMETHOD GenerateRandomBytes(uint32_t aLength, uint8_t **aBuffer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateRandomBytes(aLength, aBuffer); }
53 :
54 : #if 0
55 : /* Use the code below as a template for the implementation class for this interface. */
56 :
57 : /* Header file */
58 : class nsRandomGenerator : public nsIRandomGenerator
59 : {
60 : public:
61 : NS_DECL_ISUPPORTS
62 : NS_DECL_NSIRANDOMGENERATOR
63 :
64 : nsRandomGenerator();
65 :
66 : private:
67 : ~nsRandomGenerator();
68 :
69 : protected:
70 : /* additional members */
71 : };
72 :
73 : /* Implementation file */
74 : NS_IMPL_ISUPPORTS(nsRandomGenerator, nsIRandomGenerator)
75 :
76 : nsRandomGenerator::nsRandomGenerator()
77 : {
78 : /* member initializers and constructor code */
79 : }
80 :
81 : nsRandomGenerator::~nsRandomGenerator()
82 : {
83 : /* destructor code */
84 : }
85 :
86 : /* void generateRandomBytes (in unsigned long aLength, [array, size_is (aLength), retval] out octet aBuffer); */
87 : NS_IMETHODIMP nsRandomGenerator::GenerateRandomBytes(uint32_t aLength, uint8_t **aBuffer)
88 : {
89 : return NS_ERROR_NOT_IMPLEMENTED;
90 : }
91 :
92 : /* End of implementation class template. */
93 : #endif
94 :
95 :
96 : #endif /* __gen_nsIRandomGenerator_h__ */
|