Songbird / Development / Songbird Add-Ons API Documentation

components/property/public/sbIPropertyManager.idl

00001 /*
00002 //
00003 // BEGIN SONGBIRD GPL
00004 //
00005 // This file is part of the Songbird web player.
00006 //
00007 // Copyright(c) 2005-2008 POTI, Inc.
00008 // http://songbirdnest.com
00009 //
00010 // This file may be licensed under the terms of of the
00011 // GNU General Public License Version 2 (the "GPL").
00012 //
00013 // Software distributed under the License is distributed
00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
00015 // express or implied. See the GPL for the specific language
00016 // governing rights and limitations.
00017 //
00018 // You should have received a copy of the GPL along with this
00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html
00020 // or write to the Free Software Foundation, Inc.,
00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022 //
00023 // END SONGBIRD GPL
00024 //
00025 */
00026 
00033 #include "nsISupports.idl"
00034 
00035 interface nsISimpleEnumerator;
00036 interface nsIStringEnumerator;
00037 interface nsIStringBundle;
00038 interface nsIURI;
00039 interface sbIPropertyInfo;
00040 interface sbIPropertyArray;
00041 interface sbIPropertyUnitConverter;
00042 
00051 [scriptable, uuid(ed260380-8c1b-11dd-ad8b-0800200c9a66)]
00052 interface sbIPropertyManager : nsISupports
00053 {
00058   readonly attribute nsIStringEnumerator propertyIDs;
00059 
00065   sbIPropertyInfo getPropertyInfo(in AString aID);
00066 
00072   void addPropertyInfo(in sbIPropertyInfo aPropertyInfo);
00073 
00080   boolean hasProperty(in AString aID);
00081 
00085   nsIStringBundle createBundle(in string aURLSpec);
00086 
00090   AString getStringFromName(in nsIStringBundle aBundle, in AString aName);
00091 
00097   sbIPropertyArray getDependentProperties(in AString aID);
00098 };
00099 
00104 [scriptable, uuid(2C334049-EFCD-40ed-99F8-A96D541569E5)]
00105 interface sbIPropertyOperator : nsISupports
00106 {
00110   readonly attribute AString operator;
00111 
00116   readonly attribute AString operatorReadable;
00117 
00122   void Init(in AString aOperator, in aString aOperatorReadable);
00123 };
00124 
00130 [scriptable, uuid(dbc4e321-3a05-44e1-9217-a5ba056e1bfd)]
00131 interface sbIPropertyInfo : nsISupports
00132 {
00133   readonly attribute AString OPERATOR_EQUALS;
00134   readonly attribute AString OPERATOR_NOTEQUALS;
00135   readonly attribute AString OPERATOR_GREATER;
00136   readonly attribute AString OPERATOR_GREATEREQUAL;
00137   readonly attribute AString OPERATOR_LESS;
00138   readonly attribute AString OPERATOR_LESSEQUAL;
00139   readonly attribute AString OPERATOR_CONTAINS;
00140   readonly attribute AString OPERATOR_NOTCONTAINS;
00141   readonly attribute AString OPERATOR_BEGINSWITH;
00142   readonly attribute AString OPERATOR_NOTBEGINSWITH;
00143   readonly attribute AString OPERATOR_ENDSWITH;
00144   readonly attribute AString OPERATOR_NOTENDSWITH;
00145   readonly attribute AString OPERATOR_BETWEEN;
00146   readonly attribute AString OPERATOR_ISSET;
00147   readonly attribute AString OPERATOR_ISNOTSET;
00148 
00149   /* NOTE: if you change this list of null sort values, please update the
00150    * documentation in sbIRemoteWebPlaylist.idl as well, thanks!
00151    */
00152 
00156   const unsigned long SORT_NULL_SMALL = 0;
00157 
00161   const unsigned long SORT_NULL_BIG   = 1;
00162 
00166   const unsigned long SORT_NULL_FIRST = 2;
00167 
00171   const unsigned long SORT_NULL_LAST  = 3;
00172   
00176   attribute unsigned long nullSort;
00177 
00199   attribute sbIPropertyArray secondarySort;
00200 
00204   attribute AString id;
00205 
00209   attribute AString type;
00210 
00214   attribute AString displayName;
00215 
00220   attribute boolean userViewable;
00221 
00226   attribute boolean userEditable;
00227 
00231   attribute boolean remoteReadable;
00232 
00236   attribute boolean remoteWritable;
00237   
00241   //attribute boolean hasValues;
00242 
00246   //attribute nsIStringEnumerator values;
00247 
00251   attribute nsISimpleEnumerator operators;
00252 
00259   sbIPropertyOperator getOperator(in AString aOperator);
00260 
00266   boolean validate(in AString aValue);
00267 
00274   AString sanitize(in AString aValue);
00275 
00281   AString format(in AString aValue);
00282 
00288   AString makeSortable(in AString aValue);
00289 
00295   AString makeSearchable(in AString aValue);
00296 
00301   readonly attribute sbIPropertyUnitConverter unitConverter;
00302 };
00303 
00309 [scriptable, uuid(2c5553c0-8f2e-11dd-ad8b-0800200c9a66)]
00310 interface sbITextPropertyInfo : sbIPropertyInfo
00311 {
00315   attribute unsigned long minLength;
00316 
00320   attribute unsigned long maxLength;
00321 
00325   attribute boolean enforceLowercase;
00326   
00330   attribute boolean noCompressWhitespace;
00331 };
00332 
00338 [scriptable, uuid(66d736f5-057e-4537-98f9-df2e1b560a13)]
00339 interface sbINumberPropertyInfo : sbIPropertyInfo
00340 {
00344   const unsigned long RADIX_8  = 8;
00345 
00349   const unsigned long RADIX_10 = 10;
00350 
00354   const unsigned long RADIX_16 = 16;
00355 
00359   const unsigned long FLOAT = 0;
00360 
00364   attribute long long minValue;
00365 
00369   attribute long long maxValue;
00370 
00374   attribute double minFloatValue;
00375 
00379   attribute double maxFloatValue;
00380 
00384   attribute unsigned long radix;
00385 };
00386 
00392 [scriptable, uuid(b8d0b930-8aab-4afa-969d-3a5dca7ea536)]
00393 interface sbIURIPropertyInfo : sbIPropertyInfo
00394 {
00399   attribute AString constrainScheme;
00400 };
00401 
00407 [scriptable, uuid(4e09ff7d-732c-4d5f-9d61-2ff0c626c40a)]
00408 interface sbIDatetimePropertyInfo : sbIPropertyInfo
00409 {
00410   readonly attribute AString OPERATOR_INTHELAST;
00411   readonly attribute AString OPERATOR_NOTINTHELAST;
00412   readonly attribute AString OPERATOR_ONDATE;
00413   readonly attribute AString OPERATOR_NOTONDATE;
00414   readonly attribute AString OPERATOR_BEFOREDATE;
00415   readonly attribute AString OPERATOR_BEFOREORONDATE;
00416   readonly attribute AString OPERATOR_AFTERDATE;
00417   readonly attribute AString OPERATOR_AFTERORONDATE;
00418   readonly attribute AString OPERATOR_BETWEENDATES;
00419 
00420   const long TIMETYPE_UNINITIALIZED = -1;
00421 
00425   const long TIMETYPE_DATE = 0; 
00426   
00430   const long TIMETYPE_TIME = 1; 
00431   
00435   const long TIMETYPE_DATETIME = 2;
00436 
00441   const long TIMETYPE_TIMESTAMP = 4;
00442 
00448   attribute long timeType;
00449 
00458   attribute long long minDateTime;
00459 
00468   attribute long long maxDateTime;
00469 };
00470 
00476 [scriptable, uuid(c353b0a3-f715-4001-ae1b-f39f3a0591fa)]
00477 interface sbIDurationPropertyInfo : sbIPropertyInfo
00478 {
00487   attribute long long minDuration;
00488 
00497   attribute long long maxDuration;
00498 
00503   attribute boolean durationInverse;
00504 
00508   attribute boolean durationWithMilliseconds;
00509 };
00510 
00517 [scriptable, uuid(154e77d3-6750-4f4c-a070-473bb7645381)]
00518 interface sbIProgressPropertyInfo : sbITextPropertyInfo
00519 {
00523   attribute AString modePropertyName;
00524 };
00525 
00531 [scriptable, uuid(797f47d2-f71d-409c-993c-4c5bd5ddaf02)]
00532 interface sbIButtonPropertyInfo : nsISupports
00533 {
00537   attribute AString label;
00538 };
00539 
00545 [scriptable, uuid(f16351be-db4c-400a-8ee0-b135113f02dd)]
00546 interface sbIBooleanPropertyInfo : sbIPropertyInfo
00547 {
00548   readonly attribute AString OPERATOR_ISTRUE;
00549   readonly attribute AString OPERATOR_ISFALSE;
00550 };
00551 
00557 [scriptable, uuid(ecd56b59-906a-44c9-ac24-3345f1b70b10)]
00558 interface sbIDummyPropertyInfo : sbIPropertyInfo
00559 {
00560 };

Generated on Tue Mar 10 14:28:55 2009 for Songbird by  doxygen 1.5.2