1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/xpcom/io/nsIObjectOutputStream.idl
3 : */
4 :
5 : #ifndef __gen_nsIObjectOutputStream_h__
6 : #define __gen_nsIObjectOutputStream_h__
7 :
8 :
9 : #ifndef __gen_nsIBinaryOutputStream_h__
10 : #include "nsIBinaryOutputStream.h"
11 : #endif
12 :
13 : #ifndef __gen_nsrootidl_h__
14 : #include "nsrootidl.h"
15 : #endif
16 :
17 : /* For IDL files that don't want to include root IDL files. */
18 : #ifndef NS_NO_VTABLE
19 : #define NS_NO_VTABLE
20 : #endif
21 :
22 : /* starting interface: nsIObjectOutputStream */
23 : #define NS_IOBJECTOUTPUTSTREAM_IID_STR "92c898ac-5fde-4b99-87b3-5d486422094b"
24 :
25 : #define NS_IOBJECTOUTPUTSTREAM_IID \
26 : {0x92c898ac, 0x5fde, 0x4b99, \
27 : { 0x87, 0xb3, 0x5d, 0x48, 0x64, 0x22, 0x09, 0x4b }}
28 :
29 15628 : class NS_NO_VTABLE NS_SCRIPTABLE nsIObjectOutputStream : public nsIBinaryOutputStream {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOBJECTOUTPUTSTREAM_IID)
33 :
34 : /* void writeObject (in nsISupports aObject, in boolean aIsStrongRef); */
35 : NS_SCRIPTABLE NS_IMETHOD WriteObject(nsISupports *aObject, bool aIsStrongRef) = 0;
36 :
37 : /* void writeSingleRefObject (in nsISupports aObject); */
38 : NS_SCRIPTABLE NS_IMETHOD WriteSingleRefObject(nsISupports *aObject) = 0;
39 :
40 : /* void writeCompoundObject (in nsISupports aObject, in nsIIDRef aIID, in boolean aIsStrongRef); */
41 : NS_SCRIPTABLE NS_IMETHOD WriteCompoundObject(nsISupports *aObject, const nsIID & aIID, bool aIsStrongRef) = 0;
42 :
43 : /* void writeID (in nsIDRef aID); */
44 : NS_SCRIPTABLE NS_IMETHOD WriteID(const nsID & aID) = 0;
45 :
46 : /* [notxpcom] charPtr getBuffer (in PRUint32 aLength, in PRUint32 aAlignMask); */
47 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask) = 0;
48 :
49 : /* [notxpcom] void putBuffer (in charPtr aBuffer, in PRUint32 aLength); */
50 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength) = 0;
51 :
52 : };
53 :
54 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIObjectOutputStream, NS_IOBJECTOUTPUTSTREAM_IID)
55 :
56 : /* Use this macro when declaring classes that implement this interface. */
57 : #define NS_DECL_NSIOBJECTOUTPUTSTREAM \
58 : NS_SCRIPTABLE NS_IMETHOD WriteObject(nsISupports *aObject, bool aIsStrongRef); \
59 : NS_SCRIPTABLE NS_IMETHOD WriteSingleRefObject(nsISupports *aObject); \
60 : NS_SCRIPTABLE NS_IMETHOD WriteCompoundObject(nsISupports *aObject, const nsIID & aIID, bool aIsStrongRef); \
61 : NS_SCRIPTABLE NS_IMETHOD WriteID(const nsID & aID); \
62 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask); \
63 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength);
64 :
65 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
66 : #define NS_FORWARD_NSIOBJECTOUTPUTSTREAM(_to) \
67 : NS_SCRIPTABLE NS_IMETHOD WriteObject(nsISupports *aObject, bool aIsStrongRef) { return _to WriteObject(aObject, aIsStrongRef); } \
68 : NS_SCRIPTABLE NS_IMETHOD WriteSingleRefObject(nsISupports *aObject) { return _to WriteSingleRefObject(aObject); } \
69 : NS_SCRIPTABLE NS_IMETHOD WriteCompoundObject(nsISupports *aObject, const nsIID & aIID, bool aIsStrongRef) { return _to WriteCompoundObject(aObject, aIID, aIsStrongRef); } \
70 : NS_SCRIPTABLE NS_IMETHOD WriteID(const nsID & aID) { return _to WriteID(aID); } \
71 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask) { return _to GetBuffer(aLength, aAlignMask); } \
72 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength) { return _to PutBuffer(aBuffer, aLength); }
73 :
74 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
75 : #define NS_FORWARD_SAFE_NSIOBJECTOUTPUTSTREAM(_to) \
76 : NS_SCRIPTABLE NS_IMETHOD WriteObject(nsISupports *aObject, bool aIsStrongRef) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteObject(aObject, aIsStrongRef); } \
77 : NS_SCRIPTABLE NS_IMETHOD WriteSingleRefObject(nsISupports *aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteSingleRefObject(aObject); } \
78 : NS_SCRIPTABLE NS_IMETHOD WriteCompoundObject(nsISupports *aObject, const nsIID & aIID, bool aIsStrongRef) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteCompoundObject(aObject, aIID, aIsStrongRef); } \
79 : NS_SCRIPTABLE NS_IMETHOD WriteID(const nsID & aID) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteID(aID); } \
80 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBuffer(aLength, aAlignMask); } \
81 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->PutBuffer(aBuffer, aLength); }
82 :
83 : #if 0
84 : /* Use the code below as a template for the implementation class for this interface. */
85 :
86 : /* Header file */
87 : class nsObjectOutputStream : public nsIObjectOutputStream
88 : {
89 : public:
90 : NS_DECL_ISUPPORTS
91 : NS_DECL_NSIOBJECTOUTPUTSTREAM
92 :
93 : nsObjectOutputStream();
94 :
95 : private:
96 : ~nsObjectOutputStream();
97 :
98 : protected:
99 : /* additional members */
100 : };
101 :
102 : /* Implementation file */
103 : NS_IMPL_ISUPPORTS1(nsObjectOutputStream, nsIObjectOutputStream)
104 :
105 : nsObjectOutputStream::nsObjectOutputStream()
106 : {
107 : /* member initializers and constructor code */
108 : }
109 :
110 : nsObjectOutputStream::~nsObjectOutputStream()
111 : {
112 : /* destructor code */
113 : }
114 :
115 : /* void writeObject (in nsISupports aObject, in boolean aIsStrongRef); */
116 : NS_IMETHODIMP nsObjectOutputStream::WriteObject(nsISupports *aObject, bool aIsStrongRef)
117 : {
118 : return NS_ERROR_NOT_IMPLEMENTED;
119 : }
120 :
121 : /* void writeSingleRefObject (in nsISupports aObject); */
122 : NS_IMETHODIMP nsObjectOutputStream::WriteSingleRefObject(nsISupports *aObject)
123 : {
124 : return NS_ERROR_NOT_IMPLEMENTED;
125 : }
126 :
127 : /* void writeCompoundObject (in nsISupports aObject, in nsIIDRef aIID, in boolean aIsStrongRef); */
128 : NS_IMETHODIMP nsObjectOutputStream::WriteCompoundObject(nsISupports *aObject, const nsIID & aIID, bool aIsStrongRef)
129 : {
130 : return NS_ERROR_NOT_IMPLEMENTED;
131 : }
132 :
133 : /* void writeID (in nsIDRef aID); */
134 : NS_IMETHODIMP nsObjectOutputStream::WriteID(const nsID & aID)
135 : {
136 : return NS_ERROR_NOT_IMPLEMENTED;
137 : }
138 :
139 : /* [notxpcom] charPtr getBuffer (in PRUint32 aLength, in PRUint32 aAlignMask); */
140 : NS_IMETHODIMP_(char *) nsObjectOutputStream::GetBuffer(PRUint32 aLength, PRUint32 aAlignMask)
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 :
145 : /* [notxpcom] void putBuffer (in charPtr aBuffer, in PRUint32 aLength); */
146 : NS_IMETHODIMP_(void) nsObjectOutputStream::PutBuffer(char *aBuffer, PRUint32 aLength)
147 : {
148 : return NS_ERROR_NOT_IMPLEMENTED;
149 : }
150 :
151 : /* End of implementation class template. */
152 : #endif
153 :
154 :
155 : inline nsresult
156 : NS_WriteOptionalObject(nsIObjectOutputStream* aStream, nsISupports* aObject,
157 : bool aIsStrongRef)
158 : {
159 : bool nonnull = (aObject != nsnull);
160 : nsresult rv = aStream->WriteBoolean(nonnull);
161 : if (NS_SUCCEEDED(rv) && nonnull)
162 : rv = aStream->WriteObject(aObject, aIsStrongRef);
163 : return rv;
164 : }
165 : inline nsresult
166 : NS_WriteOptionalSingleRefObject(nsIObjectOutputStream* aStream,
167 : nsISupports* aObject)
168 : {
169 : bool nonnull = (aObject != nsnull);
170 : nsresult rv = aStream->WriteBoolean(nonnull);
171 : if (NS_SUCCEEDED(rv) && nonnull)
172 : rv = aStream->WriteSingleRefObject(aObject);
173 : return rv;
174 : }
175 : inline nsresult
176 0 : NS_WriteOptionalCompoundObject(nsIObjectOutputStream* aStream,
177 : nsISupports* aObject,
178 : const nsIID& aIID,
179 : bool aIsStrongRef)
180 : {
181 0 : bool nonnull = (aObject != nsnull);
182 0 : nsresult rv = aStream->WriteBoolean(nonnull);
183 0 : if (NS_SUCCEEDED(rv) && nonnull)
184 0 : rv = aStream->WriteCompoundObject(aObject, aIID, aIsStrongRef);
185 0 : return rv;
186 : }
187 :
188 : #endif /* __gen_nsIObjectOutputStream_h__ */
|