Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsISerializationHelper.idl
3 : */
4 :
5 : #ifndef __gen_nsISerializationHelper_h__
6 : #define __gen_nsISerializationHelper_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 nsISerializable; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsISerializationHelper */
21 : #define NS_ISERIALIZATIONHELPER_IID_STR "31654c0f-35f3-44c6-b31e-37a11516e6bc"
22 :
23 : #define NS_ISERIALIZATIONHELPER_IID \
24 : {0x31654c0f, 0x35f3, 0x44c6, \
25 : { 0xb3, 0x1e, 0x37, 0xa1, 0x15, 0x16, 0xe6, 0xbc }}
26 :
27 2 : class NS_NO_VTABLE nsISerializationHelper : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISERIALIZATIONHELPER_IID)
31 :
32 : /* ACString serializeToString (in nsISerializable serializable); */
33 : NS_IMETHOD SerializeToString(nsISerializable *serializable, nsACString & _retval) = 0;
34 :
35 : /* nsISupports deserializeObject (in ACString input); */
36 : NS_IMETHOD DeserializeObject(const nsACString & input, nsISupports * *_retval) = 0;
37 :
38 : };
39 :
40 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISerializationHelper, NS_ISERIALIZATIONHELPER_IID)
41 :
42 : /* Use this macro when declaring classes that implement this interface. */
43 : #define NS_DECL_NSISERIALIZATIONHELPER \
44 : NS_IMETHOD SerializeToString(nsISerializable *serializable, nsACString & _retval) override; \
45 : NS_IMETHOD DeserializeObject(const nsACString & input, nsISupports * *_retval) override;
46 :
47 : /* Use this macro when declaring the members of this interface when the
48 : class doesn't implement the interface. This is useful for forwarding. */
49 : #define NS_DECL_NON_VIRTUAL_NSISERIALIZATIONHELPER \
50 : nsresult SerializeToString(nsISerializable *serializable, nsACString & _retval); \
51 : nsresult DeserializeObject(const nsACString & input, nsISupports * *_retval);
52 :
53 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
54 : #define NS_FORWARD_NSISERIALIZATIONHELPER(_to) \
55 : NS_IMETHOD SerializeToString(nsISerializable *serializable, nsACString & _retval) override { return _to SerializeToString(serializable, _retval); } \
56 : NS_IMETHOD DeserializeObject(const nsACString & input, nsISupports * *_retval) override { return _to DeserializeObject(input, _retval); }
57 :
58 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
59 : #define NS_FORWARD_SAFE_NSISERIALIZATIONHELPER(_to) \
60 : NS_IMETHOD SerializeToString(nsISerializable *serializable, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SerializeToString(serializable, _retval); } \
61 : NS_IMETHOD DeserializeObject(const nsACString & input, nsISupports * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeserializeObject(input, _retval); }
62 :
63 : #if 0
64 : /* Use the code below as a template for the implementation class for this interface. */
65 :
66 : /* Header file */
67 : class nsSerializationHelper : public nsISerializationHelper
68 : {
69 : public:
70 : NS_DECL_ISUPPORTS
71 : NS_DECL_NSISERIALIZATIONHELPER
72 :
73 : nsSerializationHelper();
74 :
75 : private:
76 : ~nsSerializationHelper();
77 :
78 : protected:
79 : /* additional members */
80 : };
81 :
82 : /* Implementation file */
83 : NS_IMPL_ISUPPORTS(nsSerializationHelper, nsISerializationHelper)
84 :
85 : nsSerializationHelper::nsSerializationHelper()
86 : {
87 : /* member initializers and constructor code */
88 : }
89 :
90 : nsSerializationHelper::~nsSerializationHelper()
91 : {
92 : /* destructor code */
93 : }
94 :
95 : /* ACString serializeToString (in nsISerializable serializable); */
96 : NS_IMETHODIMP nsSerializationHelper::SerializeToString(nsISerializable *serializable, nsACString & _retval)
97 : {
98 : return NS_ERROR_NOT_IMPLEMENTED;
99 : }
100 :
101 : /* nsISupports deserializeObject (in ACString input); */
102 : NS_IMETHODIMP nsSerializationHelper::DeserializeObject(const nsACString & input, nsISupports * *_retval)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* End of implementation class template. */
108 : #endif
109 :
110 :
111 : #endif /* __gen_nsISerializationHelper_h__ */
|