sbIPropertyInfo.idl
Go to the documentation of this file.
1 /*
2  *=BEGIN SONGBIRD GPL
3  *
4  * This file is part of the Songbird web player.
5  *
6  * Copyright(c) 2005-2011 POTI, Inc.
7  * http://www.songbirdnest.com
8  *
9  * This file may be licensed under the terms of of the
10  * GNU General Public License Version 2 (the ``GPL'').
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the GPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the GPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/gpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  *=END SONGBIRD GPL
23  */
24 
25 #include "nsISupports.idl"
26 
27 interface nsISimpleEnumerator;
28 
29 interface sbIPropertyArray;
30 interface sbIPropertyOperator;
31 interface sbIPropertyUnitConverter;
32 
38 [scriptable, uuid(736df4ca-1dd2-11b2-adeb-b4366f783780)]
40 {
41  readonly attribute AString OPERATOR_EQUALS;
42  readonly attribute AString OPERATOR_NOTEQUALS;
43  readonly attribute AString OPERATOR_GREATER;
44  readonly attribute AString OPERATOR_GREATEREQUAL;
45  readonly attribute AString OPERATOR_LESS;
46  readonly attribute AString OPERATOR_LESSEQUAL;
47  readonly attribute AString OPERATOR_CONTAINS;
48  readonly attribute AString OPERATOR_NOTCONTAINS;
49  readonly attribute AString OPERATOR_BEGINSWITH;
50  readonly attribute AString OPERATOR_NOTBEGINSWITH;
51  readonly attribute AString OPERATOR_ENDSWITH;
52  readonly attribute AString OPERATOR_NOTENDSWITH;
53  readonly attribute AString OPERATOR_BETWEEN;
54  readonly attribute AString OPERATOR_ISSET;
55  readonly attribute AString OPERATOR_ISNOTSET;
56 
57  /* NOTE: if you change this list of null sort values, please update the
58  * documentation in sbIRemoteWebPlaylist.idl as well, thanks!
59  */
60 
64  const unsigned long SORT_NULL_SMALL = 0;
65 
69  const unsigned long SORT_NULL_BIG = 1;
70 
74  const unsigned long SORT_NULL_FIRST = 2;
75 
79  const unsigned long SORT_NULL_LAST = 3;
80 
84  attribute unsigned long nullSort;
85 
108 
112  attribute AString id;
113 
117  attribute AString type;
118 
122  attribute AString displayName;
123 
127  attribute AString localizationKey;
128 
133  attribute boolean userViewable;
134 
139  attribute boolean userEditable;
140 
144  attribute boolean remoteReadable;
145 
149  attribute boolean remoteWritable;
150 
157  attribute boolean usedInIdentity;
158 
162  //attribute boolean hasValues;
163 
167  //attribute nsIStringEnumerator values;
168 
173 
180  sbIPropertyOperator getOperator(in AString aOperator);
181 
187  boolean validate(in AString aValue);
188 
195  AString sanitize(in AString aValue);
196 
202  AString format(in AString aValue);
203 
209  AString makeSortable(in AString aValue);
210 
216  AString makeSearchable(in AString aValue);
217 
223 };
224 
230 [scriptable, uuid(2c5553c0-8f2e-11dd-ad8b-0800200c9a66)]
232 {
236  attribute unsigned long minLength;
237 
241  attribute unsigned long maxLength;
242 
246  attribute boolean enforceLowercase;
247 
251  attribute boolean noCompressWhitespace;
252 };
253 
259 [scriptable, uuid(66d736f5-057e-4537-98f9-df2e1b560a13)]
261 {
265  const unsigned long RADIX_8 = 8;
266 
270  const unsigned long RADIX_10 = 10;
271 
275  const unsigned long RADIX_16 = 16;
276 
280  const unsigned long FLOAT = 0;
281 
285  attribute long long minValue;
286 
290  attribute long long maxValue;
291 
295  attribute double minFloatValue;
296 
300  attribute double maxFloatValue;
301 
305  attribute unsigned long radix;
306 };
307 
313 [scriptable, uuid(b8d0b930-8aab-4afa-969d-3a5dca7ea536)]
315 {
320  attribute AString constrainScheme;
321 };
322 
328 [scriptable, uuid(4e09ff7d-732c-4d5f-9d61-2ff0c626c40a)]
330 {
331  readonly attribute AString OPERATOR_INTHELAST;
332  readonly attribute AString OPERATOR_NOTINTHELAST;
333  readonly attribute AString OPERATOR_ONDATE;
334  readonly attribute AString OPERATOR_NOTONDATE;
335  readonly attribute AString OPERATOR_BEFOREDATE;
336  readonly attribute AString OPERATOR_BEFOREORONDATE;
337  readonly attribute AString OPERATOR_AFTERDATE;
338  readonly attribute AString OPERATOR_AFTERORONDATE;
339  readonly attribute AString OPERATOR_BETWEENDATES;
340 
341  const long TIMETYPE_UNINITIALIZED = -1;
342 
346  const long TIMETYPE_DATE = 0;
347 
351  const long TIMETYPE_TIME = 1;
352 
356  const long TIMETYPE_DATETIME = 2;
357 
362  const long TIMETYPE_TIMESTAMP = 4;
363 
369  attribute long timeType;
370 
379  attribute long long minDateTime;
380 
389  attribute long long maxDateTime;
390 };
391 
397 [scriptable, uuid(c353b0a3-f715-4001-ae1b-f39f3a0591fa)]
399 {
408  attribute long long minDuration;
409 
418  attribute long long maxDuration;
419 
424  attribute boolean durationInverse;
425 
429  attribute boolean durationWithMilliseconds;
430 };
431 
438 [scriptable, uuid(154e77d3-6750-4f4c-a070-473bb7645381)]
440 {
444  attribute AString modePropertyName;
445 };
446 
452 [scriptable, uuid(f16351be-db4c-400a-8ee0-b135113f02dd)]
454 {
455  readonly attribute AString OPERATOR_ISTRUE;
456  readonly attribute AString OPERATOR_ISFALSE;
457 };
458 
464 [scriptable, uuid(ecd56b59-906a-44c9-ac24-3345f1b70b10)]
466 {
467 };
const unsigned long RADIX_10
Signed decimal representation (eg. 14 decimal)
readonly attribute AString OPERATOR_GREATER
readonly attribute AString OPERATOR_NOTONDATE
readonly attribute AString OPERATOR_CONTAINS
The property information specific to date/time fields.
readonly attribute sbIPropertyUnitConverter unitConverter
A unit converter to convert to and from the units in which the property can be expressed.
onPageChanged aValue
Definition: FeedWriter.js:1395
readonly attribute AString OPERATOR_ENDSWITH
attribute long long maxDateTime
A maximum datetime value to enforce when validating. If you do not wish to use this, set it to 0.
attribute nsISimpleEnumerator operators
True if this property has a selection list.
attribute long long minDateTime
A minimum datetime value to enforce when validating. If you do not wish to use this, set it to 0.
attribute boolean enforceLowercase
Must be lowercase (only valid for languages where this applies)
attribute AString constrainScheme
Constrain URI to a specific scheme as per RFC 2396. Some quick examples: file, http, ftp.
The property information specific to URL/URI fields.
readonly attribute AString OPERATOR_BEFOREORONDATE
attribute unsigned long minLength
Minimum length of string.
readonly attribute AString OPERATOR_NOTINTHELAST
const unsigned long SORT_NULL_LAST
Null values always last.
attribute AString modePropertyName
Minimum value allowed.
const long TIMETYPE_TIME
HH:mm:ss.ms, in localized format. Limited to 24 hour days.
attribute boolean usedInIdentity
This attribute indicates that changing this property may change the computed hash for the item...
const long TIMETYPE_DATETIME
Long date format, 2007-03-28 12:33:01 , no milliseconds.
The property information specific to date/time fields.
readonly attribute AString OPERATOR_BETWEEN
The property information specific to numeric fields.
attribute AString localizationKey
Key used to find related localization strings.
const long TIMETYPE_DATE
2007-03-28 , in localized format
const unsigned long RADIX_8
Unsigned octal representation (eg. 16, or 14 decimal).
var uuid
readonly attribute AString OPERATOR_AFTERDATE
attribute long long maxDuration
A maximum duration value to enforce when validating. If you do not wish to use this, set it to 0.
attribute unsigned long maxLength
Maximum length of string.
readonly attribute AString OPERATOR_GREATEREQUAL
attribute boolean userViewable
A user may view this property. This does not impede reading the value, it's merely meant as a guideli...
const unsigned long RADIX_16
Unsigned hex representation (eg. 0x0E, or 14 decimal)
readonly attribute AString OPERATOR_BETWEENDATES
readonly attribute AString OPERATOR_NOTCONTAINS
function d(s)
attribute AString type
The type property.
readonly attribute AString OPERATOR_ONDATE
readonly attribute AString OPERATOR_EQUALS
An interface to represent an operator that may act upon a property.
attribute long timeType
You must initialize this attribute before using this object. If you do not, all methods on this objec...
AString makeSearchable(in AString aValue)
Formats the value to enable proper search.
readonly attribute AString OPERATOR_NOTEQUALS
attribute sbIPropertyArray secondarySort
When sorting by this property, additionally sort by the following properties.
const unsigned long SORT_NULL_SMALL
Causes null values to be infinitely small. This is the default.
The property information specific to text fields.
An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (...
readonly attribute AString OPERATOR_BEGINSWITH
attribute unsigned long nullSort
Set where NULL values get sorted to.
readonly attribute AString OPERATOR_LESS
sbIPropertyOperator getOperator(in AString aOperator)
Get the sbIPropertyOperator for the given operator string.
AString makeSortable(in AString aValue)
Transforms the string into its sortable collation data equivalent.
An interface used to recognize a dummy metadata property.
attribute boolean durationWithMilliseconds
Cause the formatting to display milliseconds.
readonly attribute AString OPERATOR_ISFALSE
attribute long long minValue
Minimum value allowed.
attribute boolean remoteReadable
A web site may read the value of this property.
readonly attribute AString OPERATOR_ISSET
readonly attribute AString OPERATOR_LESSEQUAL
Property unit converter interface This is an interface songbird property converter, used to convert a property value between its various units representations.
attribute AString displayName
Localized display name of this property.
attribute boolean userEditable
A user may edit this property. This does not impede editing the value, it's merely meant as a guideli...
attribute long long maxValue
Minimum value allowed.
AString sanitize(in AString aValue)
Sanitize a value so that it passes validation.
The property information specific to boolean properties.
attribute AString id
Unique ID for this property.
attribute boolean remoteWritable
A web site may write the value of this property.
attribute long long minDuration
A minimum duration value to enforce when validating. If you do not wish to use this, set it to 0.
readonly attribute AString OPERATOR_ISNOTSET
readonly attribute AString OPERATOR_INTHELAST
const unsigned long FLOAT
Signed floating point representation (eg. 14.89)
attribute unsigned long radix
Radix (must be RADIX_8, RADIX_10, RADIX_16 or FLOAT).
readonly attribute AString OPERATOR_NOTBEGINSWITH
const unsigned long SORT_NULL_FIRST
Null values always first.
const unsigned long SORT_NULL_BIG
Causes null values to be infinitely large.
attribute double minFloatValue
Minimum floating point value allowed if number property is a float.
AString format(in AString aValue)
Formats the value for display.
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
The property information specific to progressmeters.
const long TIMETYPE_TIMESTAMP
Timestamp format, respects unix time, microsecond format.
readonly attribute AString OPERATOR_ISTRUE
readonly attribute AString OPERATOR_NOTENDSWITH
attribute boolean noCompressWhitespace
The property value should not be formatted.
attribute double maxFloatValue
Maximum float point value allowed if a number property is a float.
readonly attribute AString OPERATOR_AFTERORONDATE
boolean validate(in AString aValue)
Validates the string for this property type.
attribute boolean durationInverse
Causes the formatting to display from -xx:xx:xx to 0 instead of 0 to xx:xx:xx.
readonly attribute AString OPERATOR_BEFOREDATE