1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/intl/locale/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 19 : class NS_NO_VTABLE NS_SCRIPTABLE nsICollationFactory : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOLLATIONFACTORY_IID)
31 :
32 : /* nsICollation CreateCollation (in nsILocale locale); */
33 : NS_SCRIPTABLE NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation * *_retval NS_OUTPARAM) = 0;
34 :
35 : };
36 :
37 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICollationFactory, NS_ICOLLATIONFACTORY_IID)
38 :
39 : /* Use this macro when declaring classes that implement this interface. */
40 : #define NS_DECL_NSICOLLATIONFACTORY \
41 : NS_SCRIPTABLE NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation * *_retval NS_OUTPARAM);
42 :
43 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
44 : #define NS_FORWARD_NSICOLLATIONFACTORY(_to) \
45 : NS_SCRIPTABLE NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation * *_retval NS_OUTPARAM) { return _to CreateCollation(locale, _retval); }
46 :
47 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
48 : #define NS_FORWARD_SAFE_NSICOLLATIONFACTORY(_to) \
49 : NS_SCRIPTABLE NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCollation(locale, _retval); }
50 :
51 : #if 0
52 : /* Use the code below as a template for the implementation class for this interface. */
53 :
54 : /* Header file */
55 : class nsCollationFactory : public nsICollationFactory
56 : {
57 : public:
58 : NS_DECL_ISUPPORTS
59 : NS_DECL_NSICOLLATIONFACTORY
60 :
61 : nsCollationFactory();
62 :
63 : private:
64 : ~nsCollationFactory();
65 :
66 : protected:
67 : /* additional members */
68 : };
69 :
70 : /* Implementation file */
71 : NS_IMPL_ISUPPORTS1(nsCollationFactory, nsICollationFactory)
72 :
73 : nsCollationFactory::nsCollationFactory()
74 : {
75 : /* member initializers and constructor code */
76 : }
77 :
78 : nsCollationFactory::~nsCollationFactory()
79 : {
80 : /* destructor code */
81 : }
82 :
83 : /* nsICollation CreateCollation (in nsILocale locale); */
84 : NS_IMETHODIMP nsCollationFactory::CreateCollation(nsILocale *locale, nsICollation * *_retval NS_OUTPARAM)
85 : {
86 : return NS_ERROR_NOT_IMPLEMENTED;
87 : }
88 :
89 : /* End of implementation class template. */
90 : #endif
91 :
92 :
93 : /* starting interface: nsICollation */
94 : #define NS_ICOLLATION_IID_STR "b0132cc0-3786-4557-9874-910d7def5f93"
95 :
96 : #define NS_ICOLLATION_IID \
97 : {0xb0132cc0, 0x3786, 0x4557, \
98 : { 0x98, 0x74, 0x91, 0x0d, 0x7d, 0xef, 0x5f, 0x93 }}
99 :
100 19 : class NS_NO_VTABLE NS_SCRIPTABLE nsICollation : public nsISupports {
101 : public:
102 :
103 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOLLATION_IID)
104 :
105 : enum {
106 : kCollationStrengthDefault = 0,
107 : kCollationCaseInsensitiveAscii = 1,
108 : kCollationAccentInsenstive = 2,
109 : kCollationCaseSensitive = 0,
110 : kCollationCaseInSensitive = 3
111 : };
112 :
113 : /* void initialize (in nsILocale locale); */
114 : NS_SCRIPTABLE NS_IMETHOD Initialize(nsILocale *locale) = 0;
115 :
116 : /* long compareString (in long strength, in AString string1, in AString string2); */
117 : NS_SCRIPTABLE NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval NS_OUTPARAM) = 0;
118 :
119 : /* [noscript] void allocateRawSortKey (in long strength, in AString stringIn, [array, size_is (outLen)] out octet key, out unsigned long outLen); */
120 : NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key NS_OUTPARAM, PRUint32 *outLen NS_OUTPARAM) = 0;
121 :
122 : /* [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); */
123 : NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval NS_OUTPARAM) = 0;
124 :
125 : };
126 :
127 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICollation, NS_ICOLLATION_IID)
128 :
129 : /* Use this macro when declaring classes that implement this interface. */
130 : #define NS_DECL_NSICOLLATION \
131 : NS_SCRIPTABLE NS_IMETHOD Initialize(nsILocale *locale); \
132 : NS_SCRIPTABLE NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval NS_OUTPARAM); \
133 : NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key NS_OUTPARAM, PRUint32 *outLen NS_OUTPARAM); \
134 : NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval NS_OUTPARAM);
135 :
136 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
137 : #define NS_FORWARD_NSICOLLATION(_to) \
138 : NS_SCRIPTABLE NS_IMETHOD Initialize(nsILocale *locale) { return _to Initialize(locale); } \
139 : NS_SCRIPTABLE NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval NS_OUTPARAM) { return _to CompareString(strength, string1, string2, _retval); } \
140 : NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key NS_OUTPARAM, PRUint32 *outLen NS_OUTPARAM) { return _to AllocateRawSortKey(strength, stringIn, key, outLen); } \
141 : NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval NS_OUTPARAM) { return _to CompareRawSortKey(key1, len1, key2, len2, _retval); }
142 :
143 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
144 : #define NS_FORWARD_SAFE_NSICOLLATION(_to) \
145 : NS_SCRIPTABLE NS_IMETHOD Initialize(nsILocale *locale) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(locale); } \
146 : NS_SCRIPTABLE NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareString(strength, string1, string2, _retval); } \
147 : NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key NS_OUTPARAM, PRUint32 *outLen NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllocateRawSortKey(strength, stringIn, key, outLen); } \
148 : NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareRawSortKey(key1, len1, key2, len2, _retval); }
149 :
150 : #if 0
151 : /* Use the code below as a template for the implementation class for this interface. */
152 :
153 : /* Header file */
154 : class nsCollation : public nsICollation
155 : {
156 : public:
157 : NS_DECL_ISUPPORTS
158 : NS_DECL_NSICOLLATION
159 :
160 : nsCollation();
161 :
162 : private:
163 : ~nsCollation();
164 :
165 : protected:
166 : /* additional members */
167 : };
168 :
169 : /* Implementation file */
170 : NS_IMPL_ISUPPORTS1(nsCollation, nsICollation)
171 :
172 : nsCollation::nsCollation()
173 : {
174 : /* member initializers and constructor code */
175 : }
176 :
177 : nsCollation::~nsCollation()
178 : {
179 : /* destructor code */
180 : }
181 :
182 : /* void initialize (in nsILocale locale); */
183 : NS_IMETHODIMP nsCollation::Initialize(nsILocale *locale)
184 : {
185 : return NS_ERROR_NOT_IMPLEMENTED;
186 : }
187 :
188 : /* long compareString (in long strength, in AString string1, in AString string2); */
189 : NS_IMETHODIMP nsCollation::CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval NS_OUTPARAM)
190 : {
191 : return NS_ERROR_NOT_IMPLEMENTED;
192 : }
193 :
194 : /* [noscript] void allocateRawSortKey (in long strength, in AString stringIn, [array, size_is (outLen)] out octet key, out unsigned long outLen); */
195 : NS_IMETHODIMP nsCollation::AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key NS_OUTPARAM, PRUint32 *outLen NS_OUTPARAM)
196 : {
197 : return NS_ERROR_NOT_IMPLEMENTED;
198 : }
199 :
200 : /* [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); */
201 : NS_IMETHODIMP nsCollation::CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval NS_OUTPARAM)
202 : {
203 : return NS_ERROR_NOT_IMPLEMENTED;
204 : }
205 :
206 : /* End of implementation class template. */
207 : #endif
208 :
209 :
210 : #endif /* __gen_nsICollation_h__ */
|