Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/mozILocaleService.idl
3 : */
4 :
5 : #ifndef __gen_mozILocaleService_h__
6 : #define __gen_mozILocaleService_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 : // Define Contractid and CID
18 : #define MOZ_LOCALESERVICE_CID \
19 : { 0x92735ff4, 0x6384, 0x4ad6, { 0x85, 0x08, 0x75, 0x70, 0x10, 0xe1, 0x49, 0xee } }
20 : #define MOZ_LOCALESERVICE_CONTRACTID "@mozilla.org/intl/localeservice;1"
21 :
22 : /* starting interface: mozILocaleService */
23 : #define MOZILOCALESERVICE_IID_STR "c27f8983-b48b-4d1a-92d7-feb8106f212d"
24 :
25 : #define MOZILOCALESERVICE_IID \
26 : {0xc27f8983, 0xb48b, 0x4d1a, \
27 : { 0x92, 0xd7, 0xfe, 0xb8, 0x10, 0x6f, 0x21, 0x2d }}
28 :
29 3 : class NS_NO_VTABLE mozILocaleService : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(MOZILOCALESERVICE_IID)
33 :
34 : enum {
35 : langNegStrategyFiltering = 0,
36 : langNegStrategyMatching = 1,
37 : langNegStrategyLookup = 2
38 : };
39 :
40 : /* readonly attribute ACString defaultLocale; */
41 : NS_IMETHOD GetDefaultLocale(nsACString & aDefaultLocale) = 0;
42 :
43 : /* void getAppLocalesAsLangTags ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
44 : NS_IMETHOD GetAppLocalesAsLangTags(uint32_t *aCount, char * **aLocales) = 0;
45 :
46 : /* void getAppLocalesAsBCP47 ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
47 : NS_IMETHOD GetAppLocalesAsBCP47(uint32_t *aCount, char * **aLocales) = 0;
48 :
49 : /* void getRegionalPrefsLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aOutArray); */
50 : NS_IMETHOD GetRegionalPrefsLocales(uint32_t *aCount, char * **aOutArray) = 0;
51 :
52 : /* void negotiateLanguages ([array, size_is (aRequestedCount)] in string aRequested, [array, size_is (aAvailableCount)] in string aAvailable, [optional] in string aDefaultLocale, [optional] in long langNegStrategy, [optional] in unsigned long aRequestedCount, [optional] in unsigned long aAvailableCount, [optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
53 : NS_IMETHOD NegotiateLanguages(const char * *aRequested, const char * *aAvailable, const char * aDefaultLocale, int32_t langNegStrategy, uint32_t aRequestedCount, uint32_t aAvailableCount, uint32_t *aCount, char * **aLocales) = 0;
54 :
55 : /* ACString getAppLocaleAsLangTag (); */
56 : NS_IMETHOD GetAppLocaleAsLangTag(nsACString & _retval) = 0;
57 :
58 : /* ACString getAppLocaleAsBCP47 (); */
59 : NS_IMETHOD GetAppLocaleAsBCP47(nsACString & _retval) = 0;
60 :
61 : /* void getRequestedLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
62 : NS_IMETHOD GetRequestedLocales(uint32_t *aCount, char * **aLocales) = 0;
63 :
64 : /* ACString getRequestedLocale (); */
65 : NS_IMETHOD GetRequestedLocale(nsACString & _retval) = 0;
66 :
67 : /* void setRequestedLocales ([array, size_is (aRequestedCount)] in string aRequested, [optional] in unsigned long aRequestedCount); */
68 : NS_IMETHOD SetRequestedLocales(const char * *aRequested, uint32_t aRequestedCount) = 0;
69 :
70 : /* void getAvailableLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
71 : NS_IMETHOD GetAvailableLocales(uint32_t *aCount, char * **aLocales) = 0;
72 :
73 : /* readonly attribute boolean isAppLocaleRTL; */
74 : NS_IMETHOD GetIsAppLocaleRTL(bool *aIsAppLocaleRTL) = 0;
75 :
76 : };
77 :
78 : NS_DEFINE_STATIC_IID_ACCESSOR(mozILocaleService, MOZILOCALESERVICE_IID)
79 :
80 : /* Use this macro when declaring classes that implement this interface. */
81 : #define NS_DECL_MOZILOCALESERVICE \
82 : NS_IMETHOD GetDefaultLocale(nsACString & aDefaultLocale) override; \
83 : NS_IMETHOD GetAppLocalesAsLangTags(uint32_t *aCount, char * **aLocales) override; \
84 : NS_IMETHOD GetAppLocalesAsBCP47(uint32_t *aCount, char * **aLocales) override; \
85 : NS_IMETHOD GetRegionalPrefsLocales(uint32_t *aCount, char * **aOutArray) override; \
86 : NS_IMETHOD NegotiateLanguages(const char * *aRequested, const char * *aAvailable, const char * aDefaultLocale, int32_t langNegStrategy, uint32_t aRequestedCount, uint32_t aAvailableCount, uint32_t *aCount, char * **aLocales) override; \
87 : NS_IMETHOD GetAppLocaleAsLangTag(nsACString & _retval) override; \
88 : NS_IMETHOD GetAppLocaleAsBCP47(nsACString & _retval) override; \
89 : NS_IMETHOD GetRequestedLocales(uint32_t *aCount, char * **aLocales) override; \
90 : NS_IMETHOD GetRequestedLocale(nsACString & _retval) override; \
91 : NS_IMETHOD SetRequestedLocales(const char * *aRequested, uint32_t aRequestedCount) override; \
92 : NS_IMETHOD GetAvailableLocales(uint32_t *aCount, char * **aLocales) override; \
93 : NS_IMETHOD GetIsAppLocaleRTL(bool *aIsAppLocaleRTL) override;
94 :
95 : /* Use this macro when declaring the members of this interface when the
96 : class doesn't implement the interface. This is useful for forwarding. */
97 : #define NS_DECL_NON_VIRTUAL_MOZILOCALESERVICE \
98 : nsresult GetDefaultLocale(nsACString & aDefaultLocale); \
99 : nsresult GetAppLocalesAsLangTags(uint32_t *aCount, char * **aLocales); \
100 : nsresult GetAppLocalesAsBCP47(uint32_t *aCount, char * **aLocales); \
101 : nsresult GetRegionalPrefsLocales(uint32_t *aCount, char * **aOutArray); \
102 : nsresult NegotiateLanguages(const char * *aRequested, const char * *aAvailable, const char * aDefaultLocale, int32_t langNegStrategy, uint32_t aRequestedCount, uint32_t aAvailableCount, uint32_t *aCount, char * **aLocales); \
103 : nsresult GetAppLocaleAsLangTag(nsACString & _retval); \
104 : nsresult GetAppLocaleAsBCP47(nsACString & _retval); \
105 : nsresult GetRequestedLocales(uint32_t *aCount, char * **aLocales); \
106 : nsresult GetRequestedLocale(nsACString & _retval); \
107 : nsresult SetRequestedLocales(const char * *aRequested, uint32_t aRequestedCount); \
108 : nsresult GetAvailableLocales(uint32_t *aCount, char * **aLocales); \
109 : nsresult GetIsAppLocaleRTL(bool *aIsAppLocaleRTL);
110 :
111 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
112 : #define NS_FORWARD_MOZILOCALESERVICE(_to) \
113 : NS_IMETHOD GetDefaultLocale(nsACString & aDefaultLocale) override { return _to GetDefaultLocale(aDefaultLocale); } \
114 : NS_IMETHOD GetAppLocalesAsLangTags(uint32_t *aCount, char * **aLocales) override { return _to GetAppLocalesAsLangTags(aCount, aLocales); } \
115 : NS_IMETHOD GetAppLocalesAsBCP47(uint32_t *aCount, char * **aLocales) override { return _to GetAppLocalesAsBCP47(aCount, aLocales); } \
116 : NS_IMETHOD GetRegionalPrefsLocales(uint32_t *aCount, char * **aOutArray) override { return _to GetRegionalPrefsLocales(aCount, aOutArray); } \
117 : NS_IMETHOD NegotiateLanguages(const char * *aRequested, const char * *aAvailable, const char * aDefaultLocale, int32_t langNegStrategy, uint32_t aRequestedCount, uint32_t aAvailableCount, uint32_t *aCount, char * **aLocales) override { return _to NegotiateLanguages(aRequested, aAvailable, aDefaultLocale, langNegStrategy, aRequestedCount, aAvailableCount, aCount, aLocales); } \
118 : NS_IMETHOD GetAppLocaleAsLangTag(nsACString & _retval) override { return _to GetAppLocaleAsLangTag(_retval); } \
119 : NS_IMETHOD GetAppLocaleAsBCP47(nsACString & _retval) override { return _to GetAppLocaleAsBCP47(_retval); } \
120 : NS_IMETHOD GetRequestedLocales(uint32_t *aCount, char * **aLocales) override { return _to GetRequestedLocales(aCount, aLocales); } \
121 : NS_IMETHOD GetRequestedLocale(nsACString & _retval) override { return _to GetRequestedLocale(_retval); } \
122 : NS_IMETHOD SetRequestedLocales(const char * *aRequested, uint32_t aRequestedCount) override { return _to SetRequestedLocales(aRequested, aRequestedCount); } \
123 : NS_IMETHOD GetAvailableLocales(uint32_t *aCount, char * **aLocales) override { return _to GetAvailableLocales(aCount, aLocales); } \
124 : NS_IMETHOD GetIsAppLocaleRTL(bool *aIsAppLocaleRTL) override { return _to GetIsAppLocaleRTL(aIsAppLocaleRTL); }
125 :
126 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
127 : #define NS_FORWARD_SAFE_MOZILOCALESERVICE(_to) \
128 : NS_IMETHOD GetDefaultLocale(nsACString & aDefaultLocale) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultLocale(aDefaultLocale); } \
129 : NS_IMETHOD GetAppLocalesAsLangTags(uint32_t *aCount, char * **aLocales) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppLocalesAsLangTags(aCount, aLocales); } \
130 : NS_IMETHOD GetAppLocalesAsBCP47(uint32_t *aCount, char * **aLocales) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppLocalesAsBCP47(aCount, aLocales); } \
131 : NS_IMETHOD GetRegionalPrefsLocales(uint32_t *aCount, char * **aOutArray) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRegionalPrefsLocales(aCount, aOutArray); } \
132 : NS_IMETHOD NegotiateLanguages(const char * *aRequested, const char * *aAvailable, const char * aDefaultLocale, int32_t langNegStrategy, uint32_t aRequestedCount, uint32_t aAvailableCount, uint32_t *aCount, char * **aLocales) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NegotiateLanguages(aRequested, aAvailable, aDefaultLocale, langNegStrategy, aRequestedCount, aAvailableCount, aCount, aLocales); } \
133 : NS_IMETHOD GetAppLocaleAsLangTag(nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppLocaleAsLangTag(_retval); } \
134 : NS_IMETHOD GetAppLocaleAsBCP47(nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppLocaleAsBCP47(_retval); } \
135 : NS_IMETHOD GetRequestedLocales(uint32_t *aCount, char * **aLocales) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestedLocales(aCount, aLocales); } \
136 : NS_IMETHOD GetRequestedLocale(nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestedLocale(_retval); } \
137 : NS_IMETHOD SetRequestedLocales(const char * *aRequested, uint32_t aRequestedCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestedLocales(aRequested, aRequestedCount); } \
138 : NS_IMETHOD GetAvailableLocales(uint32_t *aCount, char * **aLocales) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAvailableLocales(aCount, aLocales); } \
139 : NS_IMETHOD GetIsAppLocaleRTL(bool *aIsAppLocaleRTL) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsAppLocaleRTL(aIsAppLocaleRTL); }
140 :
141 : #if 0
142 : /* Use the code below as a template for the implementation class for this interface. */
143 :
144 : /* Header file */
145 : class _MYCLASS_ : public mozILocaleService
146 : {
147 : public:
148 : NS_DECL_ISUPPORTS
149 : NS_DECL_MOZILOCALESERVICE
150 :
151 : _MYCLASS_();
152 :
153 : private:
154 : ~_MYCLASS_();
155 :
156 : protected:
157 : /* additional members */
158 : };
159 :
160 : /* Implementation file */
161 : NS_IMPL_ISUPPORTS(_MYCLASS_, mozILocaleService)
162 :
163 : _MYCLASS_::_MYCLASS_()
164 : {
165 : /* member initializers and constructor code */
166 : }
167 :
168 : _MYCLASS_::~_MYCLASS_()
169 : {
170 : /* destructor code */
171 : }
172 :
173 : /* readonly attribute ACString defaultLocale; */
174 : NS_IMETHODIMP _MYCLASS_::GetDefaultLocale(nsACString & aDefaultLocale)
175 : {
176 : return NS_ERROR_NOT_IMPLEMENTED;
177 : }
178 :
179 : /* void getAppLocalesAsLangTags ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
180 : NS_IMETHODIMP _MYCLASS_::GetAppLocalesAsLangTags(uint32_t *aCount, char * **aLocales)
181 : {
182 : return NS_ERROR_NOT_IMPLEMENTED;
183 : }
184 :
185 : /* void getAppLocalesAsBCP47 ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
186 : NS_IMETHODIMP _MYCLASS_::GetAppLocalesAsBCP47(uint32_t *aCount, char * **aLocales)
187 : {
188 : return NS_ERROR_NOT_IMPLEMENTED;
189 : }
190 :
191 : /* void getRegionalPrefsLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aOutArray); */
192 : NS_IMETHODIMP _MYCLASS_::GetRegionalPrefsLocales(uint32_t *aCount, char * **aOutArray)
193 : {
194 : return NS_ERROR_NOT_IMPLEMENTED;
195 : }
196 :
197 : /* void negotiateLanguages ([array, size_is (aRequestedCount)] in string aRequested, [array, size_is (aAvailableCount)] in string aAvailable, [optional] in string aDefaultLocale, [optional] in long langNegStrategy, [optional] in unsigned long aRequestedCount, [optional] in unsigned long aAvailableCount, [optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
198 : NS_IMETHODIMP _MYCLASS_::NegotiateLanguages(const char * *aRequested, const char * *aAvailable, const char * aDefaultLocale, int32_t langNegStrategy, uint32_t aRequestedCount, uint32_t aAvailableCount, uint32_t *aCount, char * **aLocales)
199 : {
200 : return NS_ERROR_NOT_IMPLEMENTED;
201 : }
202 :
203 : /* ACString getAppLocaleAsLangTag (); */
204 : NS_IMETHODIMP _MYCLASS_::GetAppLocaleAsLangTag(nsACString & _retval)
205 : {
206 : return NS_ERROR_NOT_IMPLEMENTED;
207 : }
208 :
209 : /* ACString getAppLocaleAsBCP47 (); */
210 : NS_IMETHODIMP _MYCLASS_::GetAppLocaleAsBCP47(nsACString & _retval)
211 : {
212 : return NS_ERROR_NOT_IMPLEMENTED;
213 : }
214 :
215 : /* void getRequestedLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
216 : NS_IMETHODIMP _MYCLASS_::GetRequestedLocales(uint32_t *aCount, char * **aLocales)
217 : {
218 : return NS_ERROR_NOT_IMPLEMENTED;
219 : }
220 :
221 : /* ACString getRequestedLocale (); */
222 : NS_IMETHODIMP _MYCLASS_::GetRequestedLocale(nsACString & _retval)
223 : {
224 : return NS_ERROR_NOT_IMPLEMENTED;
225 : }
226 :
227 : /* void setRequestedLocales ([array, size_is (aRequestedCount)] in string aRequested, [optional] in unsigned long aRequestedCount); */
228 : NS_IMETHODIMP _MYCLASS_::SetRequestedLocales(const char * *aRequested, uint32_t aRequestedCount)
229 : {
230 : return NS_ERROR_NOT_IMPLEMENTED;
231 : }
232 :
233 : /* void getAvailableLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aLocales); */
234 : NS_IMETHODIMP _MYCLASS_::GetAvailableLocales(uint32_t *aCount, char * **aLocales)
235 : {
236 : return NS_ERROR_NOT_IMPLEMENTED;
237 : }
238 :
239 : /* readonly attribute boolean isAppLocaleRTL; */
240 : NS_IMETHODIMP _MYCLASS_::GetIsAppLocaleRTL(bool *aIsAppLocaleRTL)
241 : {
242 : return NS_ERROR_NOT_IMPLEMENTED;
243 : }
244 :
245 : /* End of implementation class template. */
246 : #endif
247 :
248 :
249 : #endif /* __gen_mozILocaleService_h__ */
|