27 #ifndef __SBLOCALDATABASEASYNCGUIDARRAY_H__
28 #define __SBLOCALDATABASEASYNCGUIDARRAY_H__
30 #include <sbILocalDatabaseAsyncGUIDArray.h>
31 #include <sbILocalDatabaseGUIDArray.h>
33 #include <nsAutoPtr.h>
35 #include <nsIObserver.h>
36 #include <nsIRunnable.h>
37 #include <nsStringGlue.h>
38 #include <nsWeakReference.h>
43 class nsIProxyObjectManager;
45 class nsIWeakReference;
72 public nsSupportsWeakReference
78 NS_DECL_SBILOCALDATABASEGUIDARRAY
79 NS_DECL_SBILOCALDATABASEASYNCGUIDARRAY
93 nsCOMPtr<sbILocalDatabaseGUIDArray> mInner;
96 typedef nsAutoPtr<sbLocalDatabaseAsyncGUIDArrayListenerInfo>
97 sbLocalDatabaseAsyncGUIDArrayListenerInfoAutoPtr;
98 nsTArray<sbLocalDatabaseAsyncGUIDArrayListenerInfoAutoPtr>
105 PRMonitor* mSyncMonitor;
108 PRMonitor* mQueueMonitor;
111 nsCOMPtr<nsIThread> mThread;
114 PRPackedBool mThreadShouldExit;
116 nsresult SendOnGetLength(PRUint32 aLength, nsresult aResult);
117 nsresult SendOnGetGuidByIndex(PRUint32 aIndex,
118 const nsAString& aGUID,
120 nsresult SendOnGetSortPropertyValueByIndex(PRUint32 aIndex,
121 const nsAString& aGUID,
123 nsresult SendOnGetMediaItemIdByIndex(PRUint32 aIndex,
124 PRUint32 aMediaItemId,
126 nsresult SendOnStateChange(PRUint32
aState);
147 NS_DECL_SBILOCALDATABASEASYNCGUIDARRAYLISTENER
152 already_AddRefed<sbILocalDatabaseAsyncGUIDArrayListener>
GetListener();
155 nsCOMPtr<nsIWeakReference> mWeakListener;
165 nsresult
Init(nsIProxyObjectManager *aProxyObjMgr,
166 nsIWeakReference* aWeakListener);
170 nsCOMPtr<nsISupports> mRef;
173 nsRefPtr<sbWeakAsyncListenerWrapper> mWeakListenerWrapper;
176 nsCOMPtr<sbILocalDatabaseAsyncGUIDArrayListener> mProxiedListener;
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
virtual ~sbLocalDatabaseAsyncGUIDArray()
nsTArray< CommandSpec > sbCommandQueue
nsresult InitalizeThread()
sbLocalDatabaseAsyncGUIDArray * mFriendArray
~sbWeakAsyncListenerWrapper()
sbLocalDatabaseAsyncGUIDArray()
sbLocalDatabaseAsyncGUIDArrayListenerInfo()
NS_DECL_ISUPPORTS NS_DECL_NSIRUNNABLE CommandProcessor(sbLocalDatabaseAsyncGUIDArray *aFriendArray)
nsresult EnqueueCommand(CommandType aType, PRUint32 aIndex)
already_AddRefed< sbILocalDatabaseAsyncGUIDArrayListener > GetListener()
nsresult Init(nsIProxyObjectManager *aProxyObjMgr, nsIWeakReference *aWeakListener)
nsresult ShutdownThread()
NS_DECL_ISUPPORTS NS_DECL_SBILOCALDATABASEASYNCGUIDARRAYLISTENER sbWeakAsyncListenerWrapper(nsIWeakReference *aWeakListener)
NS_DECL_ISUPPORTS NS_DECL_SBILOCALDATABASEGUIDARRAY NS_DECL_SBILOCALDATABASEASYNCGUIDARRAY NS_DECL_NSIOBSERVER nsresult Init()
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
~sbLocalDatabaseAsyncGUIDArrayListenerInfo()