Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIMIMEService.idl
3 : */
4 :
5 : #ifndef __gen_nsIMIMEService_h__
6 : #define __gen_nsIMIMEService_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 nsIFile; /* forward declaration */
18 :
19 : class nsIMIMEInfo; /* forward declaration */
20 :
21 : class nsIURI; /* forward declaration */
22 :
23 : #define NS_MIMESERVICE_CID \
24 : { /* 03af31da-3109-11d3-8cd0-0060b0fc14a3 */ \
25 : 0x03af31da, \
26 : 0x3109, \
27 : 0x11d3, \
28 : {0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
29 : }
30 :
31 : /* starting interface: nsIMIMEService */
32 : #define NS_IMIMESERVICE_IID_STR "5b3675a1-02db-4f8f-a560-b34736635f47"
33 :
34 : #define NS_IMIMESERVICE_IID \
35 : {0x5b3675a1, 0x02db, 0x4f8f, \
36 : { 0xa5, 0x60, 0xb3, 0x47, 0x36, 0x63, 0x5f, 0x47 }}
37 :
38 3 : class NS_NO_VTABLE nsIMIMEService : public nsISupports {
39 : public:
40 :
41 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMIMESERVICE_IID)
42 :
43 : /* nsIMIMEInfo getFromTypeAndExtension (in ACString aMIMEType, in AUTF8String aFileExt); */
44 : NS_IMETHOD GetFromTypeAndExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsIMIMEInfo * *_retval) = 0;
45 :
46 : /* ACString getTypeFromExtension (in AUTF8String aFileExt); */
47 : NS_IMETHOD GetTypeFromExtension(const nsACString & aFileExt, nsACString & _retval) = 0;
48 :
49 : /* ACString getTypeFromURI (in nsIURI aURI); */
50 : NS_IMETHOD GetTypeFromURI(nsIURI *aURI, nsACString & _retval) = 0;
51 :
52 : /* ACString getTypeFromFile (in nsIFile aFile); */
53 : NS_IMETHOD GetTypeFromFile(nsIFile *aFile, nsACString & _retval) = 0;
54 :
55 : /* AUTF8String getPrimaryExtension (in ACString aMIMEType, in AUTF8String aFileExt); */
56 : NS_IMETHOD GetPrimaryExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsACString & _retval) = 0;
57 :
58 : };
59 :
60 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIMIMEService, NS_IMIMESERVICE_IID)
61 :
62 : /* Use this macro when declaring classes that implement this interface. */
63 : #define NS_DECL_NSIMIMESERVICE \
64 : NS_IMETHOD GetFromTypeAndExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsIMIMEInfo * *_retval) override; \
65 : NS_IMETHOD GetTypeFromExtension(const nsACString & aFileExt, nsACString & _retval) override; \
66 : NS_IMETHOD GetTypeFromURI(nsIURI *aURI, nsACString & _retval) override; \
67 : NS_IMETHOD GetTypeFromFile(nsIFile *aFile, nsACString & _retval) override; \
68 : NS_IMETHOD GetPrimaryExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsACString & _retval) override;
69 :
70 : /* Use this macro when declaring the members of this interface when the
71 : class doesn't implement the interface. This is useful for forwarding. */
72 : #define NS_DECL_NON_VIRTUAL_NSIMIMESERVICE \
73 : nsresult GetFromTypeAndExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsIMIMEInfo * *_retval); \
74 : nsresult GetTypeFromExtension(const nsACString & aFileExt, nsACString & _retval); \
75 : nsresult GetTypeFromURI(nsIURI *aURI, nsACString & _retval); \
76 : nsresult GetTypeFromFile(nsIFile *aFile, nsACString & _retval); \
77 : nsresult GetPrimaryExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsACString & _retval);
78 :
79 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
80 : #define NS_FORWARD_NSIMIMESERVICE(_to) \
81 : NS_IMETHOD GetFromTypeAndExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsIMIMEInfo * *_retval) override { return _to GetFromTypeAndExtension(aMIMEType, aFileExt, _retval); } \
82 : NS_IMETHOD GetTypeFromExtension(const nsACString & aFileExt, nsACString & _retval) override { return _to GetTypeFromExtension(aFileExt, _retval); } \
83 : NS_IMETHOD GetTypeFromURI(nsIURI *aURI, nsACString & _retval) override { return _to GetTypeFromURI(aURI, _retval); } \
84 : NS_IMETHOD GetTypeFromFile(nsIFile *aFile, nsACString & _retval) override { return _to GetTypeFromFile(aFile, _retval); } \
85 : NS_IMETHOD GetPrimaryExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsACString & _retval) override { return _to GetPrimaryExtension(aMIMEType, aFileExt, _retval); }
86 :
87 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
88 : #define NS_FORWARD_SAFE_NSIMIMESERVICE(_to) \
89 : NS_IMETHOD GetFromTypeAndExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsIMIMEInfo * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFromTypeAndExtension(aMIMEType, aFileExt, _retval); } \
90 : NS_IMETHOD GetTypeFromExtension(const nsACString & aFileExt, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTypeFromExtension(aFileExt, _retval); } \
91 : NS_IMETHOD GetTypeFromURI(nsIURI *aURI, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTypeFromURI(aURI, _retval); } \
92 : NS_IMETHOD GetTypeFromFile(nsIFile *aFile, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTypeFromFile(aFile, _retval); } \
93 : NS_IMETHOD GetPrimaryExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryExtension(aMIMEType, aFileExt, _retval); }
94 :
95 : #if 0
96 : /* Use the code below as a template for the implementation class for this interface. */
97 :
98 : /* Header file */
99 : class nsMIMEService : public nsIMIMEService
100 : {
101 : public:
102 : NS_DECL_ISUPPORTS
103 : NS_DECL_NSIMIMESERVICE
104 :
105 : nsMIMEService();
106 :
107 : private:
108 : ~nsMIMEService();
109 :
110 : protected:
111 : /* additional members */
112 : };
113 :
114 : /* Implementation file */
115 : NS_IMPL_ISUPPORTS(nsMIMEService, nsIMIMEService)
116 :
117 : nsMIMEService::nsMIMEService()
118 : {
119 : /* member initializers and constructor code */
120 : }
121 :
122 : nsMIMEService::~nsMIMEService()
123 : {
124 : /* destructor code */
125 : }
126 :
127 : /* nsIMIMEInfo getFromTypeAndExtension (in ACString aMIMEType, in AUTF8String aFileExt); */
128 : NS_IMETHODIMP nsMIMEService::GetFromTypeAndExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsIMIMEInfo * *_retval)
129 : {
130 : return NS_ERROR_NOT_IMPLEMENTED;
131 : }
132 :
133 : /* ACString getTypeFromExtension (in AUTF8String aFileExt); */
134 : NS_IMETHODIMP nsMIMEService::GetTypeFromExtension(const nsACString & aFileExt, nsACString & _retval)
135 : {
136 : return NS_ERROR_NOT_IMPLEMENTED;
137 : }
138 :
139 : /* ACString getTypeFromURI (in nsIURI aURI); */
140 : NS_IMETHODIMP nsMIMEService::GetTypeFromURI(nsIURI *aURI, nsACString & _retval)
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 :
145 : /* ACString getTypeFromFile (in nsIFile aFile); */
146 : NS_IMETHODIMP nsMIMEService::GetTypeFromFile(nsIFile *aFile, nsACString & _retval)
147 : {
148 : return NS_ERROR_NOT_IMPLEMENTED;
149 : }
150 :
151 : /* AUTF8String getPrimaryExtension (in ACString aMIMEType, in AUTF8String aFileExt); */
152 : NS_IMETHODIMP nsMIMEService::GetPrimaryExtension(const nsACString & aMIMEType, const nsACString & aFileExt, nsACString & _retval)
153 : {
154 : return NS_ERROR_NOT_IMPLEMENTED;
155 : }
156 :
157 : /* End of implementation class template. */
158 : #endif
159 :
160 :
161 : #endif /* __gen_nsIMIMEService_h__ */
|