sbIStringTransform.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
27 #include "nsISupports.idl"
28 
32 [scriptable, uuid(4b9a60a0-76e8-47ed-b701-b297d45ab95e)]
34 {
39  const unsigned long TRANSFORM_MAP_HIRAGANA = 1;
44  const unsigned long TRANSFORM_MAP_KATAKANA = 1 << 1;
45 
49  const unsigned long TRANSFORM_LOWERCASE = 1 << 4;
53  const unsigned long TRANSFORM_UPPERCASE = 1 << 5;
54 
59  const unsigned long TRANSFORM_SIMPLIFIED_CHINESE = 1 << 6;
64  const unsigned long TRANSFORM_TRADITIONAL_CHINESE = 1 << 7;
65 
70  const unsigned long TRANSFORM_IGNORE_SYMBOLS = 1 << 8;
71 
76  const unsigned long TRANSFORM_IGNORE_NONSPACE = 1 << 9;
77 
78  const unsigned long TRANSFORM_REVERSE_BYTES = 1 << 11;
79 
83  const unsigned long TRANSFORM_IGNORE_NONALPHANUM = 1 << 12;
84  const unsigned long TRANSFORM_IGNORE_NONALPHANUM_IGNORE_SPACE = 1 << 13;
85 
91  const unsigned long TRANSFORM_IGNORE_LEADING = 1 << 14;
92 
96  const unsigned long TRANSFORM_IGNORE_KEEPNUMBERSYMBOLS = 1 << 15;
97 
98  AString normalizeString(in AString aCharset,
99  in unsigned long aTransformFlags,
100  in AString aInput);
101 
102  AString convertToCharset(in AString aDestCharset,
103  in AString aInput);
104 
105  AString guessCharset(in AString aInput);
106 
107  AString removeArticles(in AString aInput, [optional] in AString aLanguage);
108 };
109 
110 %{C++
111 
112 #define SB_STRINGTRANSFORM_DESCRIPTION \
113  "Songbird String Transform"
114 #define SB_STRINGTRANSFORM_CONTRACTID \
115  "@songbirdnest.com/Songbird/Intl/StringTransform;1"
116 #define SB_STRINGTRANSFORM_CLASSNAME \
117  "sbStringTransform"
118 #define SB_STRINGTRANSFORM_CID \
119 { /*{0a8d2a48-2947-4ee4-bf36-32e7777358db}*/ \
120  0xa8d2a48, \
121  0x2947, \
122  0x4ee4, \
123  { 0xbf, 0x36, 0x32, 0xe7, 0x77, 0x73, 0x58, 0xdb } \
124 }
125 
126 %}
const unsigned long TRANSFORM_TRADITIONAL_CHINESE
Unsupported at this time.
const unsigned long TRANSFORM_IGNORE_NONALPHANUM_IGNORE_SPACE
const unsigned long TRANSFORM_IGNORE_LEADING
TRANSFORM_IGNORE_* operates on leading characters and stops as soon as a non-ignored character is fou...
const unsigned long TRANSFORM_IGNORE_SYMBOLS
Ignore symbol characters. This includes but is not limited to #, $, +, -.
const unsigned long TRANSFORM_UPPERCASE
Transform to uppercase.
const unsigned long TRANSFORM_SIMPLIFIED_CHINESE
Unsupported at this time.
AString normalizeString(in AString aCharset, in unsigned long aTransformFlags, in AString aInput)
const unsigned long TRANSFORM_IGNORE_NONALPHANUM
Ignore non-alphanumerical characters.
var uuid
function C(H)
AString convertToCharset(in AString aDestCharset, in AString aInput)
AString removeArticles(in AString aInput, [optional] in AString aLanguage)
const unsigned long TRANSFORM_MAP_KATAKANA
Unsupported at this time.
const unsigned long TRANSFORM_IGNORE_KEEPNUMBERSYMBOLS
TRANSFORM_IGNORE_* keeps number symbols in.
const unsigned long TRANSFORM_LOWERCASE
Transform to lowercase.
AString guessCharset(in AString aInput)
const unsigned long TRANSFORM_MAP_HIRAGANA
Unsupported at this time.
const unsigned long TRANSFORM_REVERSE_BYTES
const unsigned long TRANSFORM_IGNORE_NONSPACE
Ignore non-spacing characters. This includes but is not limited to diacritics.