00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00033 #include "nsISupports.idl"
00034 #include "sbIMediaList.idl"
00035
00036 interface sbIPropertyOperator;
00037 interface sbILocalDatabaseSmartMediaList;
00038
00043 [scriptable, uuid(39b60b98-1b65-4e6e-866c-25b88127f8ad)]
00044 interface sbILocalDatabaseSmartMediaListCondition : nsISupports
00045 {
00049 readonly attribute AString propertyID;
00050
00055 readonly attribute sbIPropertyOperator operator;
00056
00061 readonly attribute AString leftValue;
00062
00069 readonly attribute AString rightValue;
00070
00078 readonly attribute AString displayUnit;
00079 };
00080
00081 [scriptable, function, uuid(4b3f9a5b-44d5-4384-8f4d-6f953013f877)]
00082 interface sbILocalDatabaseSmartMediaListListener : nsISupports
00083 {
00084 void onRebuild(in sbILocalDatabaseSmartMediaList aSmartMediaList);
00085 };
00086
00087
00097 [scriptable, uuid(908211a1-2466-4642-bab9-75b228ff1532)]
00098 interface sbILocalDatabaseSmartMediaList : sbIMediaList
00099 {
00100 const unsigned long MATCH_TYPE_ANY = 0;
00101 const unsigned long MATCH_TYPE_ALL = 1;
00102 const unsigned long MATCH_TYPE_NONE = 2;
00103
00104 const unsigned long LIMIT_TYPE_NONE = 0;
00105 const unsigned long LIMIT_TYPE_ITEMS = 1;
00106 const unsigned long LIMIT_TYPE_USECS = 2;
00107 const unsigned long LIMIT_TYPE_BYTES = 3;
00108
00109 const unsigned long NOTEXISTS_ASZERO = 0;
00110 const unsigned long NOTEXISTS_ASNULL = 1;
00111
00115 attribute unsigned long matchType;
00116
00120 readonly attribute unsigned long conditionCount;
00121
00125 attribute unsigned long limitType;
00126
00130 attribute unsigned long long limit;
00131
00135 attribute AString selectPropertyID;
00136
00141 attribute boolean selectDirection;
00142
00146 attribute boolean randomSelection;
00147
00152 attribute boolean autoUpdate;
00153
00163 attribute unsigned long notExistsMode;
00164
00168 sbILocalDatabaseSmartMediaListCondition
00169 appendCondition(in AString aPropertyID,
00170 in sbIPropertyOperator aOperator,
00171 in AString aLeftValue,
00172 in AString aRightValue,
00173 in AString aDisplayUnit);
00174
00178 void removeConditionAt(in unsigned long aConditionIndex);
00179
00184 sbILocalDatabaseSmartMediaListCondition
00185 getConditionAt(in unsigned long aConditionIndex);
00186
00190 void clearConditions();
00191
00196 void rebuild();
00197
00198 void addSmartMediaListListener(in sbILocalDatabaseSmartMediaListListener aListener);
00199 void removeSmartMediaListListener(in sbILocalDatabaseSmartMediaListListener aListener);
00200
00205 attribute AString sourceLibraryGuid;
00206 };