27 #ifndef __SB_LOCALDATABASEMEDIALISTVIEW_H__
28 #define __SB_LOCALDATABASEMEDIALISTVIEW_H__
31 #include <nsCOMArray.h>
32 #include <nsClassHashtable.h>
33 #include <nsHashKeys.h>
34 #include <nsIClassInfo.h>
35 #include <nsIStringEnumerator.h>
36 #include <nsStringGlue.h>
38 #include <nsTHashtable.h>
40 #include <sbIFilterableMediaListView.h>
41 #include <sbIMediaListListener.h>
42 #include <sbIMediaListView.h>
43 #include <sbIPropertyArray.h>
44 #include <sbIPropertyManager.h>
45 #include <sbISearchableMediaListView.h>
46 #include <sbISortableMediaListView.h>
73 NS_DECL_SBIMEDIALISTVIEW
74 NS_DECL_SBIMEDIALISTLISTENER
75 NS_DECL_SBIFILTERABLEMEDIALISTVIEW
76 NS_DECL_SBISEARCHABLEMEDIALISTVIEW
77 NS_DECL_SBISORTABLEMEDIALISTVIEW
82 nsAString& aDefaultSortProperty,
83 PRUint32 aMediaListId);
96 NotifyListenersInternal(&sbIMediaListViewListener::OnFilterChanged);
100 NotifyListenersInternal(&sbIMediaListViewListener::OnSearchChanged);
104 NotifyListenersInternal(&sbIMediaListViewListener::OnSortChanged);
113 typedef nsCOMArray<sbIPropertyArray> sbPropertyArrayList;
114 typedef nsCOMArray<sbIMediaListViewListener> sbViewListenerArray;
122 static PLDHashOperator PR_CALLBACK
123 AddValuesToArrayCallback(nsStringHashKey::KeyType aKey,
127 static PLDHashOperator PR_CALLBACK
128 AddKeysToStringArrayCallback(nsStringHashKey::KeyType aKey,
132 static PLDHashOperator PR_CALLBACK
133 AddListenersToCOMArray(nsISupportsHashKey* aEntry,
138 nsresult CreateQueries();
140 nsresult Invalidate(PRBool aInvalidateLength = PR_FALSE);
156 nsStringArray * aPropertiesToIgnore,
157 PRBool* aHasCommonProperty);
161 PRBool* aHasCommonProperty);
164 PRBool* aShouldCauseInvalidation);
166 nsresult UpdateListener(PRBool aRemoveListener);
168 void NotifyListenersInternal(ListenerFunc aListenerFunc);
173 nsRefPtr<sbLocalDatabaseLibrary> mLibrary;
176 nsCOMPtr<sbIPropertyManager> mPropMan;
179 nsRefPtr<sbLocalDatabaseMediaListBase> mMediaList;
182 nsString mDefaultSortProperty;
185 PRUint32 mMediaListId;
188 nsString mDatabaseGuid;
189 nsCOMPtr<nsIURI> mDatabaseLocation;
192 nsCOMPtr<sbILocalDatabaseAsyncGUIDArray> mArray;
195 nsRefPtr<sbLocalDatabaseCascadeFilterSet> mCascadeFilterSet;
198 nsRefPtr<sbLocalDatabaseTreeView> mTreeView;
201 nsCOMPtr<sbILibraryConstraint> mViewFilter;
204 nsCOMPtr<sbILibraryConstraint> mViewSearch;
207 nsCOMPtr<sbIMutablePropertyArray> mViewSort;
210 nsString mDistinctPropertyValuesQuery;
216 PRLock* mListenerTableLock;
222 nsTHashtable<nsISupportsHashKey> mListenerTable;
225 PRPackedBool mInvalidatePending;
227 nsRefPtr<sbLocalDatabaseMediaListViewSelection> mSelection;
232 nsStringArray mIgnoreSystemProperties;
239 NS_DECL_NSISTRINGENUMERATOR
245 nsCOMPtr<sbIPropertyInfo> mPropertyInfo;
246 nsCOMPtr<nsIStringEnumerator> mValues;
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
nsTArray< nsString > sbStringArray
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
An interface to carry around arrays of nsIProperty instances Note that implementations of the interfa...
NS_DECL_ISUPPORTS NS_DECL_NSISTRINGENUMERATOR sbMakeSortableStringEnumerator(sbIPropertyInfo *aPropertyInfo, nsIStringEnumerator *aValues)
An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (...
An object containing the results of a database SELECT query.
An object responsible for executing SQL queries on the database.
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...