1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/xpcom/io/nsIObjectInputStream.idl
3 : */
4 :
5 : #ifndef __gen_nsIObjectInputStream_h__
6 : #define __gen_nsIObjectInputStream_h__
7 :
8 :
9 : #ifndef __gen_nsIBinaryInputStream_h__
10 : #include "nsIBinaryInputStream.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: nsIObjectInputStream */
23 : #define NS_IOBJECTINPUTSTREAM_IID_STR "6c248606-4eae-46fa-9df0-ba58502368eb"
24 :
25 : #define NS_IOBJECTINPUTSTREAM_IID \
26 : {0x6c248606, 0x4eae, 0x46fa, \
27 : { 0x9d, 0xf0, 0xba, 0x58, 0x50, 0x23, 0x68, 0xeb }}
28 :
29 17106 : class NS_NO_VTABLE NS_SCRIPTABLE nsIObjectInputStream : public nsIBinaryInputStream {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOBJECTINPUTSTREAM_IID)
33 :
34 : /* nsISupports readObject (in boolean aIsStrongRef); */
35 : NS_SCRIPTABLE NS_IMETHOD ReadObject(bool aIsStrongRef, nsISupports * *_retval NS_OUTPARAM) = 0;
36 :
37 : /* [notxpcom] nsresult readID (out nsID aID); */
38 : NS_IMETHOD_(nsresult) ReadID(nsID *aID NS_OUTPARAM) = 0;
39 :
40 : /* [notxpcom] charPtr getBuffer (in PRUint32 aLength, in PRUint32 aAlignMask); */
41 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask) = 0;
42 :
43 : /* [notxpcom] void putBuffer (in charPtr aBuffer, in PRUint32 aLength); */
44 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength) = 0;
45 :
46 : };
47 :
48 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIObjectInputStream, NS_IOBJECTINPUTSTREAM_IID)
49 :
50 : /* Use this macro when declaring classes that implement this interface. */
51 : #define NS_DECL_NSIOBJECTINPUTSTREAM \
52 : NS_SCRIPTABLE NS_IMETHOD ReadObject(bool aIsStrongRef, nsISupports * *_retval NS_OUTPARAM); \
53 : NS_IMETHOD_(nsresult) ReadID(nsID *aID NS_OUTPARAM); \
54 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask); \
55 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength);
56 :
57 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
58 : #define NS_FORWARD_NSIOBJECTINPUTSTREAM(_to) \
59 : NS_SCRIPTABLE NS_IMETHOD ReadObject(bool aIsStrongRef, nsISupports * *_retval NS_OUTPARAM) { return _to ReadObject(aIsStrongRef, _retval); } \
60 : NS_IMETHOD_(nsresult) ReadID(nsID *aID NS_OUTPARAM) { return _to ReadID(aID); } \
61 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask) { return _to GetBuffer(aLength, aAlignMask); } \
62 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength) { return _to PutBuffer(aBuffer, aLength); }
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_NSIOBJECTINPUTSTREAM(_to) \
66 : NS_SCRIPTABLE NS_IMETHOD ReadObject(bool aIsStrongRef, nsISupports * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadObject(aIsStrongRef, _retval); } \
67 : NS_IMETHOD_(nsresult) ReadID(nsID *aID NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadID(aID); } \
68 : NS_IMETHOD_(char *) GetBuffer(PRUint32 aLength, PRUint32 aAlignMask) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBuffer(aLength, aAlignMask); } \
69 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->PutBuffer(aBuffer, aLength); }
70 :
71 : #if 0
72 : /* Use the code below as a template for the implementation class for this interface. */
73 :
74 : /* Header file */
75 : class nsObjectInputStream : public nsIObjectInputStream
76 : {
77 : public:
78 : NS_DECL_ISUPPORTS
79 : NS_DECL_NSIOBJECTINPUTSTREAM
80 :
81 : nsObjectInputStream();
82 :
83 : private:
84 : ~nsObjectInputStream();
85 :
86 : protected:
87 : /* additional members */
88 : };
89 :
90 : /* Implementation file */
91 : NS_IMPL_ISUPPORTS1(nsObjectInputStream, nsIObjectInputStream)
92 :
93 : nsObjectInputStream::nsObjectInputStream()
94 : {
95 : /* member initializers and constructor code */
96 : }
97 :
98 : nsObjectInputStream::~nsObjectInputStream()
99 : {
100 : /* destructor code */
101 : }
102 :
103 : /* nsISupports readObject (in boolean aIsStrongRef); */
104 : NS_IMETHODIMP nsObjectInputStream::ReadObject(bool aIsStrongRef, nsISupports * *_retval NS_OUTPARAM)
105 : {
106 : return NS_ERROR_NOT_IMPLEMENTED;
107 : }
108 :
109 : /* [notxpcom] nsresult readID (out nsID aID); */
110 : NS_IMETHODIMP_(nsresult) nsObjectInputStream::ReadID(nsID *aID NS_OUTPARAM)
111 : {
112 : return NS_ERROR_NOT_IMPLEMENTED;
113 : }
114 :
115 : /* [notxpcom] charPtr getBuffer (in PRUint32 aLength, in PRUint32 aAlignMask); */
116 : NS_IMETHODIMP_(char *) nsObjectInputStream::GetBuffer(PRUint32 aLength, PRUint32 aAlignMask)
117 : {
118 : return NS_ERROR_NOT_IMPLEMENTED;
119 : }
120 :
121 : /* [notxpcom] void putBuffer (in charPtr aBuffer, in PRUint32 aLength); */
122 : NS_IMETHODIMP_(void) nsObjectInputStream::PutBuffer(char *aBuffer, PRUint32 aLength)
123 : {
124 : return NS_ERROR_NOT_IMPLEMENTED;
125 : }
126 :
127 : /* End of implementation class template. */
128 : #endif
129 :
130 :
131 : inline nsresult
132 0 : NS_ReadOptionalObject(nsIObjectInputStream* aStream, bool aIsStrongRef,
133 : nsISupports* *aResult)
134 : {
135 : bool nonnull;
136 0 : nsresult rv = aStream->ReadBoolean(&nonnull);
137 0 : if (NS_SUCCEEDED(rv)) {
138 0 : if (nonnull)
139 0 : rv = aStream->ReadObject(aIsStrongRef, aResult);
140 : else
141 0 : *aResult = nsnull;
142 : }
143 0 : return rv;
144 : }
145 :
146 : #endif /* __gen_nsIObjectInputStream_h__ */
|