Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIStreamConverterService.idl
3 : */
4 :
5 : #ifndef __gen_nsIStreamConverterService_h__
6 : #define __gen_nsIStreamConverterService_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 nsIInputStream; /* forward declaration */
18 :
19 : class nsIStreamListener; /* forward declaration */
20 :
21 : #define NS_ISTREAMCONVERTER_KEY "@mozilla.org/streamconv;1"
22 :
23 : /* starting interface: nsIStreamConverterService */
24 : #define NS_ISTREAMCONVERTERSERVICE_IID_STR "f2b1ab53-f0bd-4adb-9365-e59b1701a258"
25 :
26 : #define NS_ISTREAMCONVERTERSERVICE_IID \
27 : {0xf2b1ab53, 0xf0bd, 0x4adb, \
28 : { 0x93, 0x65, 0xe5, 0x9b, 0x17, 0x01, 0xa2, 0x58 }}
29 :
30 0 : class NS_NO_VTABLE nsIStreamConverterService : public nsISupports {
31 : public:
32 :
33 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISTREAMCONVERTERSERVICE_IID)
34 :
35 : /* boolean canConvert (in string aFromType, in string aToType); */
36 : NS_IMETHOD CanConvert(const char * aFromType, const char * aToType, bool *_retval) = 0;
37 :
38 : /* nsIInputStream convert (in nsIInputStream aFromStream, in string aFromType, in string aToType, in nsISupports aContext); */
39 : NS_IMETHOD Convert(nsIInputStream *aFromStream, const char * aFromType, const char * aToType, nsISupports *aContext, nsIInputStream * *_retval) = 0;
40 :
41 : /* nsIStreamListener asyncConvertData (in string aFromType, in string aToType, in nsIStreamListener aListener, in nsISupports aContext); */
42 : NS_IMETHOD AsyncConvertData(const char * aFromType, const char * aToType, nsIStreamListener *aListener, nsISupports *aContext, nsIStreamListener * *_retval) = 0;
43 :
44 : };
45 :
46 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIStreamConverterService, NS_ISTREAMCONVERTERSERVICE_IID)
47 :
48 : /* Use this macro when declaring classes that implement this interface. */
49 : #define NS_DECL_NSISTREAMCONVERTERSERVICE \
50 : NS_IMETHOD CanConvert(const char * aFromType, const char * aToType, bool *_retval) override; \
51 : NS_IMETHOD Convert(nsIInputStream *aFromStream, const char * aFromType, const char * aToType, nsISupports *aContext, nsIInputStream * *_retval) override; \
52 : NS_IMETHOD AsyncConvertData(const char * aFromType, const char * aToType, nsIStreamListener *aListener, nsISupports *aContext, nsIStreamListener * *_retval) override;
53 :
54 : /* Use this macro when declaring the members of this interface when the
55 : class doesn't implement the interface. This is useful for forwarding. */
56 : #define NS_DECL_NON_VIRTUAL_NSISTREAMCONVERTERSERVICE \
57 : nsresult CanConvert(const char * aFromType, const char * aToType, bool *_retval); \
58 : nsresult Convert(nsIInputStream *aFromStream, const char * aFromType, const char * aToType, nsISupports *aContext, nsIInputStream * *_retval); \
59 : nsresult AsyncConvertData(const char * aFromType, const char * aToType, nsIStreamListener *aListener, nsISupports *aContext, nsIStreamListener * *_retval);
60 :
61 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
62 : #define NS_FORWARD_NSISTREAMCONVERTERSERVICE(_to) \
63 : NS_IMETHOD CanConvert(const char * aFromType, const char * aToType, bool *_retval) override { return _to CanConvert(aFromType, aToType, _retval); } \
64 : NS_IMETHOD Convert(nsIInputStream *aFromStream, const char * aFromType, const char * aToType, nsISupports *aContext, nsIInputStream * *_retval) override { return _to Convert(aFromStream, aFromType, aToType, aContext, _retval); } \
65 : NS_IMETHOD AsyncConvertData(const char * aFromType, const char * aToType, nsIStreamListener *aListener, nsISupports *aContext, nsIStreamListener * *_retval) override { return _to AsyncConvertData(aFromType, aToType, aListener, aContext, _retval); }
66 :
67 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
68 : #define NS_FORWARD_SAFE_NSISTREAMCONVERTERSERVICE(_to) \
69 : NS_IMETHOD CanConvert(const char * aFromType, const char * aToType, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanConvert(aFromType, aToType, _retval); } \
70 : NS_IMETHOD Convert(nsIInputStream *aFromStream, const char * aFromType, const char * aToType, nsISupports *aContext, nsIInputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Convert(aFromStream, aFromType, aToType, aContext, _retval); } \
71 : NS_IMETHOD AsyncConvertData(const char * aFromType, const char * aToType, nsIStreamListener *aListener, nsISupports *aContext, nsIStreamListener * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncConvertData(aFromType, aToType, aListener, aContext, _retval); }
72 :
73 : #if 0
74 : /* Use the code below as a template for the implementation class for this interface. */
75 :
76 : /* Header file */
77 : class nsStreamConverterService : public nsIStreamConverterService
78 : {
79 : public:
80 : NS_DECL_ISUPPORTS
81 : NS_DECL_NSISTREAMCONVERTERSERVICE
82 :
83 : nsStreamConverterService();
84 :
85 : private:
86 : ~nsStreamConverterService();
87 :
88 : protected:
89 : /* additional members */
90 : };
91 :
92 : /* Implementation file */
93 : NS_IMPL_ISUPPORTS(nsStreamConverterService, nsIStreamConverterService)
94 :
95 : nsStreamConverterService::nsStreamConverterService()
96 : {
97 : /* member initializers and constructor code */
98 : }
99 :
100 : nsStreamConverterService::~nsStreamConverterService()
101 : {
102 : /* destructor code */
103 : }
104 :
105 : /* boolean canConvert (in string aFromType, in string aToType); */
106 : NS_IMETHODIMP nsStreamConverterService::CanConvert(const char * aFromType, const char * aToType, bool *_retval)
107 : {
108 : return NS_ERROR_NOT_IMPLEMENTED;
109 : }
110 :
111 : /* nsIInputStream convert (in nsIInputStream aFromStream, in string aFromType, in string aToType, in nsISupports aContext); */
112 : NS_IMETHODIMP nsStreamConverterService::Convert(nsIInputStream *aFromStream, const char * aFromType, const char * aToType, nsISupports *aContext, nsIInputStream * *_retval)
113 : {
114 : return NS_ERROR_NOT_IMPLEMENTED;
115 : }
116 :
117 : /* nsIStreamListener asyncConvertData (in string aFromType, in string aToType, in nsIStreamListener aListener, in nsISupports aContext); */
118 : NS_IMETHODIMP nsStreamConverterService::AsyncConvertData(const char * aFromType, const char * aToType, nsIStreamListener *aListener, nsISupports *aContext, nsIStreamListener * *_retval)
119 : {
120 : return NS_ERROR_NOT_IMPLEMENTED;
121 : }
122 :
123 : /* End of implementation class template. */
124 : #endif
125 :
126 :
127 : #endif /* __gen_nsIStreamConverterService_h__ */
|