Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsICollation.idl
3 : */
4 :
5 : #ifndef __gen_nsICollation_h__
6 : #define __gen_nsICollation_h__
7 :
8 :
9 : #ifndef __gen_nsILocale_h__
10 : #include "nsILocale.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 nsICollation; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsICollationFactory */
21 : #define NS_ICOLLATIONFACTORY_IID_STR "04971e14-d6b3-4ada-8cbb-c3a13842b349"
22 :
23 : #define NS_ICOLLATIONFACTORY_IID \
24 : {0x04971e14, 0xd6b3, 0x4ada, \
25 : { 0x8c, 0xbb, 0xc3, 0xa1, 0x38, 0x42, 0xb3, 0x49 }}
26 :
27 0 : class NS_NO_VTABLE nsICollationFactory : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOLLATIONFACTORY_IID)
31 :
32 : /* nsICollation CreateCollation (); */
33 : NS_IMETHOD CreateCollation(nsICollation * *_retval) = 0;
34 :
35 : /* nsICollation CreateCollationForLocale (in ACString locale); */
36 : NS_IMETHOD CreateCollationForLocale(const nsACString & locale, nsICollation * *_retval) = 0;
37 :
38 : };
39 :
40 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICollationFactory, NS_ICOLLATIONFACTORY_IID)
41 :
42 : /* Use this macro when declaring classes that implement this interface. */
43 : #define NS_DECL_NSICOLLATIONFACTORY \
44 : NS_IMETHOD CreateCollation(nsICollation * *_retval) override; \
45 : NS_IMETHOD CreateCollationForLocale(const nsACString & locale, nsICollation * *_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_NSICOLLATIONFACTORY \
50 : nsresult CreateCollation(nsICollation * *_retval); \
51 : nsresult CreateCollationForLocale(const nsACString & locale, nsICollation * *_retval);
52 :
53 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
54 : #define NS_FORWARD_NSICOLLATIONFACTORY(_to) \
55 : NS_IMETHOD CreateCollation(nsICollation * *_retval) override { return _to CreateCollation(_retval); } \
56 : NS_IMETHOD CreateCollationForLocale(const nsACString & locale, nsICollation * *_retval) override { return _to CreateCollationForLocale(locale, _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_NSICOLLATIONFACTORY(_to) \
60 : NS_IMETHOD CreateCollation(nsICollation * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCollation(_retval); } \
61 : NS_IMETHOD CreateCollationForLocale(const nsACString & locale, nsICollation * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCollationForLocale(locale, _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 nsCollationFactory : public nsICollationFactory
68 : {
69 : public:
70 : NS_DECL_ISUPPORTS
71 : NS_DECL_NSICOLLATIONFACTORY
72 :
73 : nsCollationFactory();
74 :
75 : private:
76 : ~nsCollationFactory();
77 :
78 : protected:
79 : /* additional members */
80 : };
81 :
82 : /* Implementation file */
83 : NS_IMPL_ISUPPORTS(nsCollationFactory, nsICollationFactory)
84 :
85 : nsCollationFactory::nsCollationFactory()
86 : {
87 : /* member initializers and constructor code */
88 : }
89 :
90 : nsCollationFactory::~nsCollationFactory()
91 : {
92 : /* destructor code */
93 : }
94 :
95 : /* nsICollation CreateCollation (); */
96 : NS_IMETHODIMP nsCollationFactory::CreateCollation(nsICollation * *_retval)
97 : {
98 : return NS_ERROR_NOT_IMPLEMENTED;
99 : }
100 :
101 : /* nsICollation CreateCollationForLocale (in ACString locale); */
102 : NS_IMETHODIMP nsCollationFactory::CreateCollationForLocale(const nsACString & locale, nsICollation * *_retval)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* End of implementation class template. */
108 : #endif
109 :
110 :
111 : /* starting interface: nsICollation */
112 : #define NS_ICOLLATION_IID_STR "b0132cc0-3786-4557-9874-910d7def5f93"
113 :
114 : #define NS_ICOLLATION_IID \
115 : {0xb0132cc0, 0x3786, 0x4557, \
116 : { 0x98, 0x74, 0x91, 0x0d, 0x7d, 0xef, 0x5f, 0x93 }}
117 :
118 0 : class NS_NO_VTABLE nsICollation : public nsISupports {
119 : public:
120 :
121 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOLLATION_IID)
122 :
123 : enum {
124 : kCollationStrengthDefault = 0,
125 : kCollationCaseInsensitiveAscii = 1,
126 : kCollationAccentInsenstive = 2,
127 : kCollationCaseSensitive = 0,
128 : kCollationCaseInSensitive = 3
129 : };
130 :
131 : /* void initialize (in ACString locale); */
132 : NS_IMETHOD Initialize(const nsACString & locale) = 0;
133 :
134 : /* long compareString (in long strength, in AString string1, in AString string2); */
135 : NS_IMETHOD CompareString(int32_t strength, const nsAString & string1, const nsAString & string2, int32_t *_retval) = 0;
136 :
137 : /* [noscript] void allocateRawSortKey (in long strength, in AString stringIn, [array, size_is (outLen)] out octet key, out unsigned long outLen); */
138 : NS_IMETHOD AllocateRawSortKey(int32_t strength, const nsAString & stringIn, uint8_t **key, uint32_t *outLen) = 0;
139 :
140 : /* [noscript] long compareRawSortKey ([array, size_is (len1), const] in octet key1, in unsigned long len1, [array, size_is (len2), const] in octet key2, in unsigned long len2); */
141 : NS_IMETHOD CompareRawSortKey(const uint8_t *key1, uint32_t len1, const uint8_t *key2, uint32_t len2, int32_t *_retval) = 0;
142 :
143 : };
144 :
145 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICollation, NS_ICOLLATION_IID)
146 :
147 : /* Use this macro when declaring classes that implement this interface. */
148 : #define NS_DECL_NSICOLLATION \
149 : NS_IMETHOD Initialize(const nsACString & locale) override; \
150 : NS_IMETHOD CompareString(int32_t strength, const nsAString & string1, const nsAString & string2, int32_t *_retval) override; \
151 : NS_IMETHOD AllocateRawSortKey(int32_t strength, const nsAString & stringIn, uint8_t **key, uint32_t *outLen) override; \
152 : NS_IMETHOD CompareRawSortKey(const uint8_t *key1, uint32_t len1, const uint8_t *key2, uint32_t len2, int32_t *_retval) override;
153 :
154 : /* Use this macro when declaring the members of this interface when the
155 : class doesn't implement the interface. This is useful for forwarding. */
156 : #define NS_DECL_NON_VIRTUAL_NSICOLLATION \
157 : nsresult Initialize(const nsACString & locale); \
158 : nsresult CompareString(int32_t strength, const nsAString & string1, const nsAString & string2, int32_t *_retval); \
159 : nsresult AllocateRawSortKey(int32_t strength, const nsAString & stringIn, uint8_t **key, uint32_t *outLen); \
160 : nsresult CompareRawSortKey(const uint8_t *key1, uint32_t len1, const uint8_t *key2, uint32_t len2, int32_t *_retval);
161 :
162 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
163 : #define NS_FORWARD_NSICOLLATION(_to) \
164 : NS_IMETHOD Initialize(const nsACString & locale) override { return _to Initialize(locale); } \
165 : NS_IMETHOD CompareString(int32_t strength, const nsAString & string1, const nsAString & string2, int32_t *_retval) override { return _to CompareString(strength, string1, string2, _retval); } \
166 : NS_IMETHOD AllocateRawSortKey(int32_t strength, const nsAString & stringIn, uint8_t **key, uint32_t *outLen) override { return _to AllocateRawSortKey(strength, stringIn, key, outLen); } \
167 : NS_IMETHOD CompareRawSortKey(const uint8_t *key1, uint32_t len1, const uint8_t *key2, uint32_t len2, int32_t *_retval) override { return _to CompareRawSortKey(key1, len1, key2, len2, _retval); }
168 :
169 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
170 : #define NS_FORWARD_SAFE_NSICOLLATION(_to) \
171 : NS_IMETHOD Initialize(const nsACString & locale) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(locale); } \
172 : NS_IMETHOD CompareString(int32_t strength, const nsAString & string1, const nsAString & string2, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareString(strength, string1, string2, _retval); } \
173 : NS_IMETHOD AllocateRawSortKey(int32_t strength, const nsAString & stringIn, uint8_t **key, uint32_t *outLen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AllocateRawSortKey(strength, stringIn, key, outLen); } \
174 : NS_IMETHOD CompareRawSortKey(const uint8_t *key1, uint32_t len1, const uint8_t *key2, uint32_t len2, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareRawSortKey(key1, len1, key2, len2, _retval); }
175 :
176 : #if 0
177 : /* Use the code below as a template for the implementation class for this interface. */
178 :
179 : /* Header file */
180 : class nsCollation : public nsICollation
181 : {
182 : public:
183 : NS_DECL_ISUPPORTS
184 : NS_DECL_NSICOLLATION
185 :
186 : nsCollation();
187 :
188 : private:
189 : ~nsCollation();
190 :
191 : protected:
192 : /* additional members */
193 : };
194 :
195 : /* Implementation file */
196 : NS_IMPL_ISUPPORTS(nsCollation, nsICollation)
197 :
198 : nsCollation::nsCollation()
199 : {
200 : /* member initializers and constructor code */
201 : }
202 :
203 : nsCollation::~nsCollation()
204 : {
205 : /* destructor code */
206 : }
207 :
208 : /* void initialize (in ACString locale); */
209 : NS_IMETHODIMP nsCollation::Initialize(const nsACString & locale)
210 : {
211 : return NS_ERROR_NOT_IMPLEMENTED;
212 : }
213 :
214 : /* long compareString (in long strength, in AString string1, in AString string2); */
215 : NS_IMETHODIMP nsCollation::CompareString(int32_t strength, const nsAString & string1, const nsAString & string2, int32_t *_retval)
216 : {
217 : return NS_ERROR_NOT_IMPLEMENTED;
218 : }
219 :
220 : /* [noscript] void allocateRawSortKey (in long strength, in AString stringIn, [array, size_is (outLen)] out octet key, out unsigned long outLen); */
221 : NS_IMETHODIMP nsCollation::AllocateRawSortKey(int32_t strength, const nsAString & stringIn, uint8_t **key, uint32_t *outLen)
222 : {
223 : return NS_ERROR_NOT_IMPLEMENTED;
224 : }
225 :
226 : /* [noscript] long compareRawSortKey ([array, size_is (len1), const] in octet key1, in unsigned long len1, [array, size_is (len2), const] in octet key2, in unsigned long len2); */
227 : NS_IMETHODIMP nsCollation::CompareRawSortKey(const uint8_t *key1, uint32_t len1, const uint8_t *key2, uint32_t len2, int32_t *_retval)
228 : {
229 : return NS_ERROR_NOT_IMPLEMENTED;
230 : }
231 :
232 : /* End of implementation class template. */
233 : #endif
234 :
235 :
236 : #endif /* __gen_nsICollation_h__ */
|