Go to the documentation of this file.
1 /*
3  *
4  * This file is part of the Songbird web player.
5  *
6  * Copyright(c) 2005-2011 POTI, Inc.
7  *
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
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
23  */
25 #include "nsISupports.idl"
27 interface nsISimpleEnumerator;
29 interface sbIPropertyArray;
30 interface sbIPropertyOperator;
31 interface sbIPropertyUnitConverter;
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;
57  /* NOTE: if you change this list of null sort values, please update the
58  * documentation in sbIRemoteWebPlaylist.idl as well, thanks!
59  */
64  const unsigned long SORT_NULL_SMALL = 0;
69  const unsigned long SORT_NULL_BIG = 1;
74  const unsigned long SORT_NULL_FIRST = 2;
79  const unsigned long SORT_NULL_LAST = 3;
84  attribute unsigned long nullSort;
112  attribute AString id;
117  attribute AString type;
122  attribute AString displayName;
127  attribute AString localizationKey;
133  attribute boolean userViewable;
139  attribute boolean userEditable;
144  attribute boolean remoteReadable;
149  attribute boolean remoteWritable;
157  attribute boolean usedInIdentity;
162  //attribute boolean hasValues;
167  //attribute nsIStringEnumerator values;
180  sbIPropertyOperator getOperator(in AString aOperator);
187  boolean validate(in AString aValue);
195  AString sanitize(in AString aValue);
202  AString format(in AString aValue);
209  AString makeSortable(in AString aValue);
216  AString makeSearchable(in AString aValue);
223 };
230 [scriptable, uuid(2c5553c0-8f2e-11dd-ad8b-0800200c9a66)]
232 {
236  attribute unsigned long minLength;
241  attribute unsigned long maxLength;
246  attribute boolean enforceLowercase;
251  attribute boolean noCompressWhitespace;
252 };
259 [scriptable, uuid(66d736f5-057e-4537-98f9-df2e1b560a13)]
261 {
265  const unsigned long RADIX_8 = 8;
270  const unsigned long RADIX_10 = 10;
275  const unsigned long RADIX_16 = 16;
280  const unsigned long FLOAT = 0;
285  attribute long long minValue;
290  attribute long long maxValue;
295  attribute double minFloatValue;
300  attribute double maxFloatValue;
305  attribute unsigned long radix;
306 };
313 [scriptable, uuid(b8d0b930-8aab-4afa-969d-3a5dca7ea536)]
315 {
320  attribute AString constrainScheme;
321 };
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;
341  const long TIMETYPE_UNINITIALIZED = -1;
346  const long TIMETYPE_DATE = 0;
351  const long TIMETYPE_TIME = 1;
356  const long TIMETYPE_DATETIME = 2;
362  const long TIMETYPE_TIMESTAMP = 4;
369  attribute long timeType;
379  attribute long long minDateTime;
389  attribute long long maxDateTime;
390 };
397 [scriptable, uuid(c353b0a3-f715-4001-ae1b-f39f3a0591fa)]
399 {
408  attribute long long minDuration;
418  attribute long long maxDuration;
424  attribute boolean durationInverse;
429  attribute boolean durationWithMilliseconds;
430 };
438 [scriptable, uuid(154e77d3-6750-4f4c-a070-473bb7645381)]
440 {
444  attribute AString modePropertyName;
445 };
452 [scriptable, uuid(f16351be-db4c-400a-8ee0-b135113f02dd)]
454 {
455  readonly attribute AString OPERATOR_ISTRUE;
456  readonly attribute AString OPERATOR_ISFALSE;
457 };
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, 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...
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.
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