42 var PROP_HIDDEN =
"http://songbirdnest.com/data/1.0#hidden";
46 for (var
i = 0;
i < 10;
i++) {
47 var item = library.createMediaItem(
newURI(
"file://foo/" +
i));
48 var
hidden = item.getProperty(PROP_HIDDEN);
51 item.setProperty(PROP_HIDDEN,
"1");
58 onEnumerationBegin:
function() {
60 onEnumeratedItem:
function(list, item) {
61 this.items.push(item);
63 onEnumerationEnd:
function() {
67 library.enumerateItemsByProperty(PROP_HIDDEN,
"0",
69 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
74 library.enumerateItemsByProperty(PROP_HIDDEN,
"1",
76 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
83 var
PROP_ISLIST =
"http://songbirdnest.com/data/1.0#isList";
86 for (var
i = 0;
i < 11;
i++) {
87 library.createMediaItem(
newURI(
"file://foo/" +
i));
89 for (var
i = 0;
i < 7;
i++) {
90 library.createMediaList(
"simple");
96 onEnumerationBegin:
function() {
98 onEnumeratedItem:
function(list, item) {
99 this.items.push(item);
101 onEnumerationEnd:
function() {
105 library.enumerateItemsByProperty(PROP_ISLIST,
"0",
107 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
113 library.enumerateItemsByProperty(PROP_ISLIST,
"1",
115 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
123 var
PROP_ISLIST =
"http://songbirdnest.com/data/1.0#isList";
124 var PROP_HIDDEN =
"http://songbirdnest.com/data/1.0#hidden";
127 for (var
i = 0;
i < 20;
i++) {
128 library.createMediaItem(
newURI(
"file://foo/" +
i));
130 for (var
i = 0;
i < 7;
i++) {
131 library.createMediaList(
"simple");
133 for (var
i = 0;
i < 3;
i++) {
134 var list = library.createMediaList(
"simple");
135 list.setProperty(PROP_HIDDEN,
"1");
141 onEnumerationBegin:
function() {
143 onEnumeratedItem:
function(list, item) {
144 this.items.push(item);
146 onEnumerationEnd:
function() {
152 pa.appendProperty(PROP_ISLIST,
"0");
153 pa.appendProperty(PROP_HIDDEN,
"0");
155 library.enumerateItemsByProperties(pa, listener,
156 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
164 pa.appendProperty(PROP_ISLIST,
"1");
165 pa.appendProperty(PROP_HIDDEN,
"0");
167 library.enumerateItemsByProperties(pa, listener,
168 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
176 pa.appendProperty(PROP_ISLIST,
"1");
177 pa.appendProperty(PROP_HIDDEN,
"1");
179 library.enumerateItemsByProperties(pa, listener,
180 Ci.sbIMediaList.ENUMERATIONTYPE_LOCKING);
187 var pa =
Cc[
"@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
188 .createInstance(
Ci.sbIMutablePropertyArray);
function assertEqual(aExpected, aActual, aMessage)
function createLibrary(databaseGuid, databaseLocation)
function newURI(aURLString)
_getSelectedPageStyle s i