Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsISerializable.idl
3 : */
4 :
5 : #ifndef __gen_nsISerializable_h__
6 : #define __gen_nsISerializable_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 nsIObjectInputStream; /* forward declaration */
18 :
19 : class nsIObjectOutputStream; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsISerializable */
23 : #define NS_ISERIALIZABLE_IID_STR "91cca981-c26d-44a8-bebe-d9ed4891503a"
24 :
25 : #define NS_ISERIALIZABLE_IID \
26 : {0x91cca981, 0xc26d, 0x44a8, \
27 : { 0xbe, 0xbe, 0xd9, 0xed, 0x48, 0x91, 0x50, 0x3a }}
28 :
29 11117 : class NS_NO_VTABLE nsISerializable : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISERIALIZABLE_IID)
33 :
34 : /* void read (in nsIObjectInputStream aInputStream); */
35 : NS_IMETHOD Read(nsIObjectInputStream *aInputStream) = 0;
36 :
37 : /* void write (in nsIObjectOutputStream aOutputStream); */
38 : NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) = 0;
39 :
40 : };
41 :
42 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISerializable, NS_ISERIALIZABLE_IID)
43 :
44 : /* Use this macro when declaring classes that implement this interface. */
45 : #define NS_DECL_NSISERIALIZABLE \
46 : NS_IMETHOD Read(nsIObjectInputStream *aInputStream) override; \
47 : NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) override;
48 :
49 : /* Use this macro when declaring the members of this interface when the
50 : class doesn't implement the interface. This is useful for forwarding. */
51 : #define NS_DECL_NON_VIRTUAL_NSISERIALIZABLE \
52 : nsresult Read(nsIObjectInputStream *aInputStream); \
53 : nsresult Write(nsIObjectOutputStream *aOutputStream);
54 :
55 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
56 : #define NS_FORWARD_NSISERIALIZABLE(_to) \
57 : NS_IMETHOD Read(nsIObjectInputStream *aInputStream) override { return _to Read(aInputStream); } \
58 : NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) override { return _to Write(aOutputStream); }
59 :
60 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
61 : #define NS_FORWARD_SAFE_NSISERIALIZABLE(_to) \
62 : NS_IMETHOD Read(nsIObjectInputStream *aInputStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Read(aInputStream); } \
63 : NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(aOutputStream); }
64 :
65 : #if 0
66 : /* Use the code below as a template for the implementation class for this interface. */
67 :
68 : /* Header file */
69 : class nsSerializable : public nsISerializable
70 : {
71 : public:
72 : NS_DECL_ISUPPORTS
73 : NS_DECL_NSISERIALIZABLE
74 :
75 : nsSerializable();
76 :
77 : private:
78 : ~nsSerializable();
79 :
80 : protected:
81 : /* additional members */
82 : };
83 :
84 : /* Implementation file */
85 : NS_IMPL_ISUPPORTS(nsSerializable, nsISerializable)
86 :
87 : nsSerializable::nsSerializable()
88 : {
89 : /* member initializers and constructor code */
90 : }
91 :
92 : nsSerializable::~nsSerializable()
93 : {
94 : /* destructor code */
95 : }
96 :
97 : /* void read (in nsIObjectInputStream aInputStream); */
98 : NS_IMETHODIMP nsSerializable::Read(nsIObjectInputStream *aInputStream)
99 : {
100 : return NS_ERROR_NOT_IMPLEMENTED;
101 : }
102 :
103 : /* void write (in nsIObjectOutputStream aOutputStream); */
104 : NS_IMETHODIMP nsSerializable::Write(nsIObjectOutputStream *aOutputStream)
105 : {
106 : return NS_ERROR_NOT_IMPLEMENTED;
107 : }
108 :
109 : /* End of implementation class template. */
110 : #endif
111 :
112 :
113 : #endif /* __gen_nsISerializable_h__ */
|