Back to index

lightning-sunbird  0.9+nobinonly
test.h
Go to the documentation of this file.
00001 /*
00002  * DO NOT EDIT.  THIS FILE IS GENERATED FROM test.idl
00003  */
00004 
00005 #ifndef __gen_test_h__
00006 #define __gen_test_h__
00007 
00008 
00009 #ifndef __gen_nsISupports_h__
00010 #include "nsISupports.h"
00011 #endif
00012 
00013 /* For IDL files that don't want to include root IDL files. */
00014 #ifndef NS_NO_VTABLE
00015 #define NS_NO_VTABLE
00016 #endif
00017 
00018 /* starting interface:    testCallback */
00019 #define TESTCALLBACK_IID_STR "75d2225d-0a67-4dbc-91de-78319594cce8"
00020 
00021 #define TESTCALLBACK_IID \
00022   {0x75d2225d, 0x0a67, 0x4dbc, \
00023     { 0x91, 0xde, 0x78, 0x31, 0x95, 0x94, 0xcc, 0xe8 }}
00024 
00025 class NS_NO_VTABLE testCallback : public nsISupports {
00026  public: 
00027 
00028   NS_DEFINE_STATIC_IID_ACCESSOR(TESTCALLBACK_IID)
00029 
00030   /* void call (); */
00031   NS_IMETHOD Call(void) = 0;
00032 
00033 };
00034 
00035 /* Use this macro when declaring classes that implement this interface. */
00036 #define NS_DECL_TESTCALLBACK \
00037   NS_IMETHOD Call(void); 
00038 
00039 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
00040 #define NS_FORWARD_TESTCALLBACK(_to) \
00041   NS_IMETHOD Call(void) { return _to Call(); } 
00042 
00043 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
00044 #define NS_FORWARD_SAFE_TESTCALLBACK(_to) \
00045   NS_IMETHOD Call(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Call(); } 
00046 
00047 #if 0
00048 /* Use the code below as a template for the implementation class for this interface. */
00049 
00050 /* Header file */
00051 class _MYCLASS_ : public testCallback
00052 {
00053 public:
00054   NS_DECL_ISUPPORTS
00055   NS_DECL_TESTCALLBACK
00056 
00057   _MYCLASS_();
00058   virtual ~_MYCLASS_();
00059   /* additional members */
00060 };
00061 
00062 /* Implementation file */
00063 NS_IMPL_ISUPPORTS1(_MYCLASS_, testCallback)
00064 
00065 _MYCLASS_::_MYCLASS_()
00066 {
00067   /* member initializers and constructor code */
00068 }
00069 
00070 _MYCLASS_::~_MYCLASS_()
00071 {
00072   /* destructor code */
00073 }
00074 
00075 /* void call (); */
00076 NS_IMETHODIMP _MYCLASS_::Call()
00077 {
00078     return NS_ERROR_NOT_IMPLEMENTED;
00079 }
00080 
00081 /* End of implementation class template. */
00082 #endif
00083 
00084 
00085 /* starting interface:    test */
00086 #define TEST_IID_STR "1afbcf6a-e23f-4e12-b191-4c0a76cd9cec"
00087 
00088 #define TEST_IID \
00089   {0x1afbcf6a, 0xe23f, 0x4e12, \
00090     { 0xb1, 0x91, 0x4c, 0x0a, 0x76, 0xcd, 0x9c, 0xec }}
00091 
00092 class NS_NO_VTABLE test : public nsISupports {
00093  public: 
00094 
00095   NS_DEFINE_STATIC_IID_ACCESSOR(TEST_IID)
00096 
00097   /* void say (in string sayIt); */
00098   NS_IMETHOD Say(const char *sayIt) = 0;
00099 
00100   /* void shout (in string shoutIt); */
00101   NS_IMETHOD Shout(const char *shoutIt) = 0;
00102 
00103   /* void poke (in string with); */
00104   NS_IMETHOD Poke(const char *with) = 0;
00105 
00106   /* PRInt32 add (in PRInt32 a, in PRInt32 b); */
00107   NS_IMETHOD Add(PRInt32 a, PRInt32 b, PRInt32 *_retval) = 0;
00108 
00109   /* string peek (); */
00110   NS_IMETHOD Peek(char **_retval) = 0;
00111 
00112   /* void callback (in testCallback cb); */
00113   NS_IMETHOD Callback(testCallback *cb) = 0;
00114 
00115   /* attribute PRInt32 intProp; */
00116   NS_IMETHOD GetIntProp(PRInt32 *aIntProp) = 0;
00117   NS_IMETHOD SetIntProp(PRInt32 aIntProp) = 0;
00118 
00119   /* readonly attribute PRInt32 roIntProp; */
00120   NS_IMETHOD GetRoIntProp(PRInt32 *aRoIntProp) = 0;
00121 
00122 };
00123 
00124 /* Use this macro when declaring classes that implement this interface. */
00125 #define NS_DECL_TEST \
00126   NS_IMETHOD Say(const char *sayIt); \
00127   NS_IMETHOD Shout(const char *shoutIt); \
00128   NS_IMETHOD Poke(const char *with); \
00129   NS_IMETHOD Add(PRInt32 a, PRInt32 b, PRInt32 *_retval); \
00130   NS_IMETHOD Peek(char **_retval); \
00131   NS_IMETHOD Callback(testCallback *cb); \
00132   NS_IMETHOD GetIntProp(PRInt32 *aIntProp); \
00133   NS_IMETHOD SetIntProp(PRInt32 aIntProp); \
00134   NS_IMETHOD GetRoIntProp(PRInt32 *aRoIntProp); 
00135 
00136 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
00137 #define NS_FORWARD_TEST(_to) \
00138   NS_IMETHOD Say(const char *sayIt) { return _to Say(sayIt); } \
00139   NS_IMETHOD Shout(const char *shoutIt) { return _to Shout(shoutIt); } \
00140   NS_IMETHOD Poke(const char *with) { return _to Poke(with); } \
00141   NS_IMETHOD Add(PRInt32 a, PRInt32 b, PRInt32 *_retval) { return _to Add(a, b, _retval); } \
00142   NS_IMETHOD Peek(char **_retval) { return _to Peek(_retval); } \
00143   NS_IMETHOD Callback(testCallback *cb) { return _to Callback(cb); } \
00144   NS_IMETHOD GetIntProp(PRInt32 *aIntProp) { return _to GetIntProp(aIntProp); } \
00145   NS_IMETHOD SetIntProp(PRInt32 aIntProp) { return _to SetIntProp(aIntProp); } \
00146   NS_IMETHOD GetRoIntProp(PRInt32 *aRoIntProp) { return _to GetRoIntProp(aRoIntProp); } 
00147 
00148 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
00149 #define NS_FORWARD_SAFE_TEST(_to) \
00150   NS_IMETHOD Say(const char *sayIt) { return !_to ? NS_ERROR_NULL_POINTER : _to->Say(sayIt); } \
00151   NS_IMETHOD Shout(const char *shoutIt) { return !_to ? NS_ERROR_NULL_POINTER : _to->Shout(shoutIt); } \
00152   NS_IMETHOD Poke(const char *with) { return !_to ? NS_ERROR_NULL_POINTER : _to->Poke(with); } \
00153   NS_IMETHOD Add(PRInt32 a, PRInt32 b, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(a, b, _retval); } \
00154   NS_IMETHOD Peek(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Peek(_retval); } \
00155   NS_IMETHOD Callback(testCallback *cb) { return !_to ? NS_ERROR_NULL_POINTER : _to->Callback(cb); } \
00156   NS_IMETHOD GetIntProp(PRInt32 *aIntProp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntProp(aIntProp); } \
00157   NS_IMETHOD SetIntProp(PRInt32 aIntProp) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIntProp(aIntProp); } \
00158   NS_IMETHOD GetRoIntProp(PRInt32 *aRoIntProp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoIntProp(aRoIntProp); } 
00159 
00160 #if 0
00161 /* Use the code below as a template for the implementation class for this interface. */
00162 
00163 /* Header file */
00164 class _MYCLASS_ : public test
00165 {
00166 public:
00167   NS_DECL_ISUPPORTS
00168   NS_DECL_TEST
00169 
00170   _MYCLASS_();
00171   virtual ~_MYCLASS_();
00172   /* additional members */
00173 };
00174 
00175 /* Implementation file */
00176 NS_IMPL_ISUPPORTS1(_MYCLASS_, test)
00177 
00178 _MYCLASS_::_MYCLASS_()
00179 {
00180   /* member initializers and constructor code */
00181 }
00182 
00183 _MYCLASS_::~_MYCLASS_()
00184 {
00185   /* destructor code */
00186 }
00187 
00188 /* void say (in string sayIt); */
00189 NS_IMETHODIMP _MYCLASS_::Say(const char *sayIt)
00190 {
00191     return NS_ERROR_NOT_IMPLEMENTED;
00192 }
00193 
00194 /* void shout (in string shoutIt); */
00195 NS_IMETHODIMP _MYCLASS_::Shout(const char *shoutIt)
00196 {
00197     return NS_ERROR_NOT_IMPLEMENTED;
00198 }
00199 
00200 /* void poke (in string with); */
00201 NS_IMETHODIMP _MYCLASS_::Poke(const char *with)
00202 {
00203     return NS_ERROR_NOT_IMPLEMENTED;
00204 }
00205 
00206 /* PRInt32 add (in PRInt32 a, in PRInt32 b); */
00207 NS_IMETHODIMP _MYCLASS_::Add(PRInt32 a, PRInt32 b, PRInt32 *_retval)
00208 {
00209     return NS_ERROR_NOT_IMPLEMENTED;
00210 }
00211 
00212 /* string peek (); */
00213 NS_IMETHODIMP _MYCLASS_::Peek(char **_retval)
00214 {
00215     return NS_ERROR_NOT_IMPLEMENTED;
00216 }
00217 
00218 /* void callback (in testCallback cb); */
00219 NS_IMETHODIMP _MYCLASS_::Callback(testCallback *cb)
00220 {
00221     return NS_ERROR_NOT_IMPLEMENTED;
00222 }
00223 
00224 /* attribute PRInt32 intProp; */
00225 NS_IMETHODIMP _MYCLASS_::GetIntProp(PRInt32 *aIntProp)
00226 {
00227     return NS_ERROR_NOT_IMPLEMENTED;
00228 }
00229 NS_IMETHODIMP _MYCLASS_::SetIntProp(PRInt32 aIntProp)
00230 {
00231     return NS_ERROR_NOT_IMPLEMENTED;
00232 }
00233 
00234 /* readonly attribute PRInt32 roIntProp; */
00235 NS_IMETHODIMP _MYCLASS_::GetRoIntProp(PRInt32 *aRoIntProp)
00236 {
00237     return NS_ERROR_NOT_IMPLEMENTED;
00238 }
00239 
00240 /* End of implementation class template. */
00241 #endif
00242 
00243 
00244 /* starting interface:    testString */
00245 #define TESTSTRING_IID_STR "5a1f21a2-8aa3-4147-a808-1e1a422dcb76"
00246 
00247 #define TESTSTRING_IID \
00248   {0x5a1f21a2, 0x8aa3, 0x4147, \
00249     { 0xa8, 0x08, 0x1e, 0x1a, 0x42, 0x2d, 0xcb, 0x76 }}
00250 
00251 class NS_NO_VTABLE testString : public nsISupports {
00252  public: 
00253 
00254   NS_DEFINE_STATIC_IID_ACCESSOR(TESTSTRING_IID)
00255 
00256   /* void say (in string sayIt); */
00257   NS_IMETHOD Say(const char *sayIt) = 0;
00258 
00259 };
00260 
00261 /* Use this macro when declaring classes that implement this interface. */
00262 #define NS_DECL_TESTSTRING \
00263   NS_IMETHOD Say(const char *sayIt); 
00264 
00265 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
00266 #define NS_FORWARD_TESTSTRING(_to) \
00267   NS_IMETHOD Say(const char *sayIt) { return _to Say(sayIt); } 
00268 
00269 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
00270 #define NS_FORWARD_SAFE_TESTSTRING(_to) \
00271   NS_IMETHOD Say(const char *sayIt) { return !_to ? NS_ERROR_NULL_POINTER : _to->Say(sayIt); } 
00272 
00273 #if 0
00274 /* Use the code below as a template for the implementation class for this interface. */
00275 
00276 /* Header file */
00277 class _MYCLASS_ : public testString
00278 {
00279 public:
00280   NS_DECL_ISUPPORTS
00281   NS_DECL_TESTSTRING
00282 
00283   _MYCLASS_();
00284   virtual ~_MYCLASS_();
00285   /* additional members */
00286 };
00287 
00288 /* Implementation file */
00289 NS_IMPL_ISUPPORTS1(_MYCLASS_, testString)
00290 
00291 _MYCLASS_::_MYCLASS_()
00292 {
00293   /* member initializers and constructor code */
00294 }
00295 
00296 _MYCLASS_::~_MYCLASS_()
00297 {
00298   /* destructor code */
00299 }
00300 
00301 /* void say (in string sayIt); */
00302 NS_IMETHODIMP _MYCLASS_::Say(const char *sayIt)
00303 {
00304     return NS_ERROR_NOT_IMPLEMENTED;
00305 }
00306 
00307 /* End of implementation class template. */
00308 #endif
00309 
00310 
00311 /* starting interface:    testInt */
00312 #define TESTINT_IID_STR "5a1f21a2-8aa3-4147-a808-1e1a422dcb77"
00313 
00314 #define TESTINT_IID \
00315   {0x5a1f21a2, 0x8aa3, 0x4147, \
00316     { 0xa8, 0x08, 0x1e, 0x1a, 0x42, 0x2d, 0xcb, 0x77 }}
00317 
00318 class NS_NO_VTABLE testInt : public nsISupports {
00319  public: 
00320 
00321   NS_DEFINE_STATIC_IID_ACCESSOR(TESTINT_IID)
00322 
00323   /* void add (in PRInt32 a, in PRInt32 b); */
00324   NS_IMETHOD Add(PRInt32 a, PRInt32 b) = 0;
00325 
00326 };
00327 
00328 /* Use this macro when declaring classes that implement this interface. */
00329 #define NS_DECL_TESTINT \
00330   NS_IMETHOD Add(PRInt32 a, PRInt32 b); 
00331 
00332 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
00333 #define NS_FORWARD_TESTINT(_to) \
00334   NS_IMETHOD Add(PRInt32 a, PRInt32 b) { return _to Add(a, b); } 
00335 
00336 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
00337 #define NS_FORWARD_SAFE_TESTINT(_to) \
00338   NS_IMETHOD Add(PRInt32 a, PRInt32 b) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(a, b); } 
00339 
00340 #if 0
00341 /* Use the code below as a template for the implementation class for this interface. */
00342 
00343 /* Header file */
00344 class _MYCLASS_ : public testInt
00345 {
00346 public:
00347   NS_DECL_ISUPPORTS
00348   NS_DECL_TESTINT
00349 
00350   _MYCLASS_();
00351   virtual ~_MYCLASS_();
00352   /* additional members */
00353 };
00354 
00355 /* Implementation file */
00356 NS_IMPL_ISUPPORTS1(_MYCLASS_, testInt)
00357 
00358 _MYCLASS_::_MYCLASS_()
00359 {
00360   /* member initializers and constructor code */
00361 }
00362 
00363 _MYCLASS_::~_MYCLASS_()
00364 {
00365   /* destructor code */
00366 }
00367 
00368 /* void add (in PRInt32 a, in PRInt32 b); */
00369 NS_IMETHODIMP _MYCLASS_::Add(PRInt32 a, PRInt32 b)
00370 {
00371     return NS_ERROR_NOT_IMPLEMENTED;
00372 }
00373 
00374 /* End of implementation class template. */
00375 #endif
00376 
00377 
00378 #endif /* __gen_test_h__ */