30 #include <nsAutoLock.h>
31 #include <nsComponentManagerUtils.h>
32 #include <nsIObserverService.h>
33 #include <nsIStringEnumerator.h>
34 #include <nsIThread.h>
36 #include <nsThreadUtils.h>
38 #include <sbILocalDatabasePropertyCache.h>
47 static PRLogModuleInfo* gLocalDatabaseAsyncGUIDArrayLog = nsnull;
48 #define TRACE(args) PR_LOG(gLocalDatabaseAsyncGUIDArrayLog, PR_LOG_DEBUG, args)
49 #define LOG(args) PR_LOG(gLocalDatabaseAsyncGUIDArrayLog, PR_LOG_WARN, args)
56 #define SB_LOCALDATABASE_ASYNCGUIDARRAY_THREAD_TIMEOUT (45)
68 mThreadShouldExit(PR_FALSE)
71 if (!gLocalDatabaseAsyncGUIDArrayLog) {
72 gLocalDatabaseAsyncGUIDArrayLog =
73 PR_NewLogModule(
"sbLocalDatabaseAsyncGUIDArray");
77 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - Created",
this));
83 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - dtor",
this));
88 nsAutoMonitor::DestroyMonitor(mSyncMonitor);
92 nsAutoMonitor::DestroyMonitor(mQueueMonitor);
95 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - Destroyed",
this));
105 NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY);
107 mSyncMonitor = nsAutoMonitor::NewMonitor(
"sbLocalDatabaseAsyncGUIDArray::mSyncMonitor");
108 NS_ENSURE_TRUE(mSyncMonitor, NS_ERROR_OUT_OF_MEMORY);
110 mQueueMonitor = nsAutoMonitor::NewMonitor(
"sbLocalDatabaseAsyncGUIDArray::mQueueMonitor");
111 NS_ENSURE_TRUE(mQueueMonitor, NS_ERROR_OUT_OF_MEMORY);
114 do_GetService(
"@mozilla.org/observer-service;1", &rv);
115 NS_ENSURE_SUCCESS(rv, rv);
118 NS_ENSURE_SUCCESS(rv, rv);
126 mThreadShouldExit = PR_FALSE;
129 NS_ENSURE_TRUE(runnable, NS_ERROR_OUT_OF_MEMORY);
131 return NS_NewThread(getter_AddRefs(mThread), runnable);
141 nsAutoMonitor mon(mQueueMonitor);
142 mThreadShouldExit = PR_TRUE;
160 NS_ENSURE_STATE(mAsyncListenerArray.Length());
162 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - EnqueueCommand(%d, %d)",
163 this, aType, aIndex));
166 nsAutoMonitor mon(mQueueMonitor);
169 NS_ENSURE_TRUE(cs, NS_ERROR_OUT_OF_MEMORY);
175 NS_ENSURE_SUCCESS(rv, rv);
186 sbLocalDatabaseAsyncGUIDArray::AddAsyncListener
189 TRACE((
"LocalDatabaseAsyncGUIDArray[0x%.8x] - AddAsyncListener 0x%.8x",
192 NS_ENSURE_ARG_POINTER(aListener);
196 nsCOMPtr<nsIProxyObjectManager> proxyObjMgr =
198 NS_ENSURE_SUCCESS(rv, rv);
200 nsAutoMonitor monitor(mSyncMonitor);
203 PRUint32
length = mAsyncListenerArray.Length();
204 nsCOMPtr<nsISupports> ref = do_QueryInterface(aListener, &rv);
205 NS_ENSURE_SUCCESS(rv, rv);
207 nsCOMPtr<nsIWeakReference> weak = do_GetWeakReference(aListener, &rv);
208 NS_ENSURE_SUCCESS(rv, rv);
210 if(mAsyncListenerArray[
i]->mRef == weak) {
211 NS_WARNING(
"Attempted to add an async listener twice!");
216 sbLocalDatabaseAsyncGUIDArrayListenerInfoAutoPtr
218 NS_ENSURE_TRUE(info, NS_ERROR_OUT_OF_MEMORY);
220 rv = info->Init(proxyObjMgr, weak);
221 NS_ENSURE_SUCCESS(rv, rv);
223 sbLocalDatabaseAsyncGUIDArrayListenerInfoAutoPtr* added =
224 mAsyncListenerArray.AppendElement(info.forget());
225 NS_ENSURE_TRUE(added, NS_ERROR_OUT_OF_MEMORY);
231 sbLocalDatabaseAsyncGUIDArray::RemoveAsyncListener
234 TRACE((
"LocalDatabaseAsyncGUIDArray[0x%.8x] - RemoveAsyncListener 0x%.8x",
237 NS_ENSURE_ARG_POINTER(aListener);
238 nsAutoMonitor monitor(mSyncMonitor);
241 PRUint32 length = mAsyncListenerArray.Length();
243 nsCOMPtr<nsIWeakReference> weak = do_GetWeakReference(aListener, &rv);
244 NS_ENSURE_SUCCESS(rv, rv);
245 if (NS_SUCCEEDED(rv)) {
247 if(mAsyncListenerArray[
i]->mRef == weak) {
248 mAsyncListenerArray.RemoveElementAt(
i);
252 NS_WARNING(
"Attempted to remove an async listener that was never added!");
259 sbLocalDatabaseAsyncGUIDArray::GetLengthAsync()
265 sbLocalDatabaseAsyncGUIDArray::GetGuidByIndexAsync(PRUint32 aIndex)
271 sbLocalDatabaseAsyncGUIDArray::GetSortPropertyValueByIndexAsync(PRUint32 aIndex)
277 sbLocalDatabaseAsyncGUIDArray::GetMediaItemIdByIndexAsync(PRUint32 aIndex)
285 nsAutoMonitor monitor(mSyncMonitor);
287 NS_ENSURE_ARG_POINTER(_retval);
289 nsRefPtr<sbLocalDatabaseAsyncGUIDArray> newArray;
291 NS_ENSURE_TRUE(newArray, NS_ERROR_OUT_OF_MEMORY);
293 nsresult rv = newArray->Init();
294 NS_ENSURE_SUCCESS(rv, rv);
296 rv = mInner->CloneInto(newArray);
297 NS_ENSURE_SUCCESS(rv, rv);
299 NS_ADDREF(*_retval = newArray);
305 sbLocalDatabaseAsyncGUIDArray::Observe(
nsISupports *aSubject,
307 const PRUnichar *
aData)
310 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - Observe",
this));
316 do_GetService(
"@mozilla.org/observer-service;1", &rv);
317 NS_ENSURE_SUCCESS(rv, rv);
326 sbLocalDatabaseAsyncGUIDArray::GetDatabaseGUID(nsAString& aDatabaseGUID)
328 nsAutoMonitor monitor(mSyncMonitor);
330 return mInner->GetDatabaseGUID(aDatabaseGUID);
333 sbLocalDatabaseAsyncGUIDArray::SetDatabaseGUID(
const nsAString& aDatabaseGUID)
335 nsAutoMonitor monitor(mSyncMonitor);
337 return mInner->SetDatabaseGUID(aDatabaseGUID);
341 sbLocalDatabaseAsyncGUIDArray::GetDatabaseLocation(nsIURI** aDatabaseLocation)
343 nsAutoMonitor monitor(mSyncMonitor);
345 return mInner->GetDatabaseLocation(aDatabaseLocation);
348 sbLocalDatabaseAsyncGUIDArray::SetDatabaseLocation(nsIURI* aDatabaseLocation)
350 nsAutoMonitor monitor(mSyncMonitor);
352 return mInner->SetDatabaseLocation(aDatabaseLocation);
356 sbLocalDatabaseAsyncGUIDArray::GetBaseTable(nsAString& aBaseTable)
358 nsAutoMonitor monitor(mSyncMonitor);
360 return mInner->GetBaseTable(aBaseTable);
363 sbLocalDatabaseAsyncGUIDArray::SetBaseTable(
const nsAString& aBaseTable)
365 nsAutoMonitor monitor(mSyncMonitor);
367 return mInner->SetBaseTable(aBaseTable);
371 sbLocalDatabaseAsyncGUIDArray::GetBaseConstraintColumn(nsAString& aBaseConstraintColumn)
373 nsAutoMonitor monitor(mSyncMonitor);
375 return mInner->GetBaseConstraintColumn(aBaseConstraintColumn);
378 sbLocalDatabaseAsyncGUIDArray::SetBaseConstraintColumn(
const nsAString& aBaseConstraintColumn)
380 nsAutoMonitor monitor(mSyncMonitor);
382 return mInner->SetBaseConstraintColumn(aBaseConstraintColumn);
386 sbLocalDatabaseAsyncGUIDArray::GetBaseConstraintValue(PRUint32* aBaseConstraintValue)
388 nsAutoMonitor monitor(mSyncMonitor);
390 return mInner->GetBaseConstraintValue(aBaseConstraintValue);
393 sbLocalDatabaseAsyncGUIDArray::SetBaseConstraintValue(PRUint32 aBaseConstraintValue)
395 nsAutoMonitor monitor(mSyncMonitor);
397 return mInner->SetBaseConstraintValue(aBaseConstraintValue);
401 sbLocalDatabaseAsyncGUIDArray::GetFetchSize(PRUint32* aFetchSize)
403 nsAutoMonitor monitor(mSyncMonitor);
405 return mInner->GetFetchSize(aFetchSize);
408 sbLocalDatabaseAsyncGUIDArray::SetFetchSize(PRUint32 aFetchSize)
410 nsAutoMonitor monitor(mSyncMonitor);
412 return mInner->SetFetchSize(aFetchSize);
416 sbLocalDatabaseAsyncGUIDArray::GetIsDistinct(PRBool* aIsDistinct)
418 nsAutoMonitor monitor(mSyncMonitor);
420 return mInner->GetIsDistinct(aIsDistinct);
423 sbLocalDatabaseAsyncGUIDArray::SetIsDistinct(PRBool aIsDistinct)
425 nsAutoMonitor monitor(mSyncMonitor);
427 return mInner->SetIsDistinct(aIsDistinct);
431 sbLocalDatabaseAsyncGUIDArray::GetIsValid(PRBool *aIsValid)
433 nsAutoMonitor monitor(mSyncMonitor);
435 return mInner->GetIsValid(aIsValid);
439 sbLocalDatabaseAsyncGUIDArray::GetDistinctWithSortableValues(PRBool *aDistinctWithSortableValues)
441 nsAutoMonitor monitor(mSyncMonitor);
443 return mInner->GetDistinctWithSortableValues(aDistinctWithSortableValues);
446 sbLocalDatabaseAsyncGUIDArray::SetDistinctWithSortableValues(PRBool aDistinctWithSortableValues)
448 nsAutoMonitor monitor(mSyncMonitor);
450 return mInner->SetDistinctWithSortableValues(aDistinctWithSortableValues);
454 sbLocalDatabaseAsyncGUIDArray::GetLength(PRUint32* aLength)
456 nsAutoMonitor monitor(mSyncMonitor);
458 return mInner->GetLength(aLength);
464 nsAutoMonitor monitor(mSyncMonitor);
466 return mInner->GetListener(aListener);
471 nsAutoMonitor monitor(mSyncMonitor);
473 return mInner->SetListener(aListener);
479 nsAutoMonitor monitor(mSyncMonitor);
481 return mInner->GetPropertyCache(aPropertyCache);
486 nsAutoMonitor monitor(mSyncMonitor);
488 return mInner->SetPropertyCache(aPropertyCache);
492 sbLocalDatabaseAsyncGUIDArray::SetLengthCache(
495 nsAutoMonitor monitor(mSyncMonitor);
497 return mInner->SetLengthCache(aLengthCache);
501 sbLocalDatabaseAsyncGUIDArray::GetLengthCache(
504 nsAutoMonitor monitor(mSyncMonitor);
506 return mInner->GetLengthCache(aLengthCache);
510 sbLocalDatabaseAsyncGUIDArray::MayInvalidate(PRUint32 * aDirtyPropIDs,
513 nsAutoMonitor monitor(mSyncMonitor);
515 return mInner->MayInvalidate(aDirtyPropIDs, aCount);
519 sbLocalDatabaseAsyncGUIDArray::AddSort(
const nsAString& aProperty,
522 nsAutoMonitor monitor(mSyncMonitor);
524 return mInner->AddSort(aProperty, aAscending);
528 sbLocalDatabaseAsyncGUIDArray::ClearSorts()
530 nsAutoMonitor monitor(mSyncMonitor);
532 return mInner->ClearSorts();
536 sbLocalDatabaseAsyncGUIDArray::GetCurrentSort(
sbIPropertyArray** aCurrentSort)
538 nsAutoMonitor monitor(mSyncMonitor);
540 return mInner->GetCurrentSort(aCurrentSort);
544 sbLocalDatabaseAsyncGUIDArray::AddFilter(
const nsAString& aProperty,
548 nsAutoMonitor monitor(mSyncMonitor);
550 return mInner->AddFilter(aProperty, aValues, aIsSearch);
554 sbLocalDatabaseAsyncGUIDArray::ClearFilters()
556 nsAutoMonitor monitor(mSyncMonitor);
558 return mInner->ClearFilters();
562 sbLocalDatabaseAsyncGUIDArray::IsIndexCached(PRUint32 aIndex,
565 nsAutoMonitor monitor(mSyncMonitor);
567 return mInner->IsIndexCached(aIndex, _retval);
571 sbLocalDatabaseAsyncGUIDArray::GetSortPropertyValueByIndex(PRUint32 aIndex,
574 nsAutoMonitor monitor(mSyncMonitor);
576 return mInner->GetSortPropertyValueByIndex(aIndex, _retval);
580 sbLocalDatabaseAsyncGUIDArray::GetMediaItemIdByIndex(PRUint32 aIndex,
583 nsAutoMonitor monitor(mSyncMonitor);
585 return mInner->GetMediaItemIdByIndex(aIndex, _retval);
589 sbLocalDatabaseAsyncGUIDArray::GetOrdinalByIndex(PRUint32 aIndex,
592 nsAutoMonitor monitor(mSyncMonitor);
594 return mInner->GetOrdinalByIndex(aIndex, _retval);
598 sbLocalDatabaseAsyncGUIDArray::GetGuidByIndex(PRUint32 aIndex,
601 nsAutoMonitor monitor(mSyncMonitor);
603 return mInner->GetGuidByIndex(aIndex, _retval);
607 sbLocalDatabaseAsyncGUIDArray::GetRowidByIndex(PRUint32 aIndex,
610 nsAutoMonitor monitor(mSyncMonitor);
612 return mInner->GetRowidByIndex(aIndex, _retval);
616 sbLocalDatabaseAsyncGUIDArray::GetViewItemUIDByIndex(PRUint32 aIndex,
619 nsAutoMonitor monitor(mSyncMonitor);
621 return mInner->GetViewItemUIDByIndex(aIndex, _retval);
625 sbLocalDatabaseAsyncGUIDArray::Invalidate(PRBool aInvalidateLength)
627 nsAutoMonitor monitor(mSyncMonitor);
629 return mInner->Invalidate(aInvalidateLength);
635 nsAutoMonitor monitor(mSyncMonitor);
637 return mInner->Clone(_retval);
643 nsAutoMonitor monitor(mSyncMonitor);
645 return mInner->CloneInto(aDest);
649 sbLocalDatabaseAsyncGUIDArray::GetFirstIndexByPrefix(
const nsAString&
aValue,
652 nsAutoMonitor monitor(mSyncMonitor);
654 return mInner->GetFirstIndexByPrefix(aValue, _retval);
658 sbLocalDatabaseAsyncGUIDArray::GetFirstIndexByGuid(
const nsAString& aGuid,
661 nsAutoMonitor monitor(mSyncMonitor);
663 return mInner->GetFirstIndexByGuid(aGuid, _retval);
667 sbLocalDatabaseAsyncGUIDArray::GetIndexByViewItemUID
668 (
const nsAString& aViewItemUID,
671 nsAutoMonitor monitor(mSyncMonitor);
673 return mInner->GetIndexByViewItemUID(aViewItemUID, _retval);
677 sbLocalDatabaseAsyncGUIDArray::ContainsGuid(
const nsAString& aGuid,
680 nsAutoMonitor monitor(mSyncMonitor);
682 return mInner->ContainsGuid(aGuid, _retval);
686 sbLocalDatabaseAsyncGUIDArray::SuppressInvalidation(PRBool aSuppress)
688 nsAutoMonitor monitor(mSyncMonitor);
690 return mInner->SuppressInvalidation(aSuppress);
694 sbLocalDatabaseAsyncGUIDArray::RemoveByIndex(PRUint32 aIndex)
696 nsAutoMonitor monitor(mSyncMonitor);
698 return mInner->RemoveByIndex(aIndex);
702 sbLocalDatabaseAsyncGUIDArray::SendOnGetLength(PRUint32 aLength,
706 PRBool listenSucceeded = PR_TRUE;
708 PRUint32 length = mAsyncListenerArray.Length();
710 rv = mAsyncListenerArray[
i]->mProxiedListener->OnGetLength(aLength,
713 listenSucceeded = PR_FALSE;
715 NS_WARN_IF_FALSE(listenSucceeded,
"Listener notification failed");
721 sbLocalDatabaseAsyncGUIDArray::SendOnGetGuidByIndex(PRUint32 aIndex,
722 const nsAString& aGUID,
726 PRBool listenSucceeded = PR_TRUE;
728 PRUint32 length = mAsyncListenerArray.Length();
730 rv = mAsyncListenerArray[
i]->mProxiedListener->OnGetGuidByIndex(aIndex,
734 listenSucceeded = PR_FALSE;
736 NS_WARN_IF_FALSE(listenSucceeded,
"Listener notification failed");
742 sbLocalDatabaseAsyncGUIDArray::SendOnGetSortPropertyValueByIndex
744 const nsAString& aGUID,
748 PRBool listenSucceeded = PR_TRUE;
750 PRUint32 length = mAsyncListenerArray.Length();
752 rv = mAsyncListenerArray[
i]->mProxiedListener->
753 OnGetSortPropertyValueByIndex(aIndex, aGUID, aResult);
755 listenSucceeded = PR_FALSE;
757 NS_WARN_IF_FALSE(listenSucceeded,
"Listener notification failed");
763 sbLocalDatabaseAsyncGUIDArray::SendOnGetMediaItemIdByIndex
765 PRUint32 aMediaItemId,
769 PRBool listenSucceeded = PR_TRUE;
771 PRUint32 length = mAsyncListenerArray.Length();
773 rv = mAsyncListenerArray[
i]->mProxiedListener->
774 OnGetMediaItemIdByIndex(aIndex, aMediaItemId, aResult);
776 listenSucceeded = PR_FALSE;
778 NS_WARN_IF_FALSE(listenSucceeded,
"Listener notification failed");
784 sbLocalDatabaseAsyncGUIDArray::SendOnStateChange(PRUint32
aState)
787 PRBool listenSucceeded = PR_TRUE;
789 PRUint32 length = mAsyncListenerArray.Length();
791 rv = mAsyncListenerArray[
i]->mProxiedListener->OnStateChange(aState);
793 listenSucceeded = PR_FALSE;
795 NS_WARN_IF_FALSE(listenSucceeded,
"Listener notification failed");
803 mFriendArray(aFriendArray)
805 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - CommandProcessor ctor",
this));
810 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - CommandProcessor dtor",
this));
814 CommandProcessor::Run()
818 const PRIntervalTime timeout =
822 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - Background Thread Start",
mFriendArray));
833 NS_ENSURE_TRUE(
mFriendArray->mQueueMonitor, NS_ERROR_FAILURE);
838 rv = mon.Wait(timeout);
850 nsCOMPtr<nsIThread> doomed;
853 mFriendArray->mThread, NS_PROXY_ASYNC, getter_AddRefs(doomed));
855 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - Background Thread End Due To Timeout",
mFriendArray));
864 NS_WARNING(
"failed to construct proxy to main thread");
876 switch(command.
type) {
900 NS_NOTREACHED(
"Invalid command type");
901 rv = NS_ERROR_UNEXPECTED;
904 NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"Listener notification failed");
923 nsCOMPtr<sbILocalDatabaseGUIDArray> inner(
mFriendArray->mInner);
927 NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"Listener notification failed");
932 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - "
936 nsresult innerResult = inner->GetLength(&length);
937 rv =
mFriendArray->SendOnGetLength(length, innerResult);
943 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - "
947 nsresult innerResult = inner->GetGuidByIndex(cs.
index, guid);
956 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - "
957 "Background GetSortPropertyValueByIndex",
mFriendArray));
960 nsresult innerResult = inner->GetSortPropertyValueByIndex(cs.
index,
970 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - "
973 PRUint32 mediaItemId;
974 nsresult innerResult = inner->GetMediaItemIdByIndex(cs.
index,
983 NS_NOTREACHED(
"Invalid command type");
984 rv = NS_ERROR_UNEXPECTED;
987 NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"Listener notification failed");
991 NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"Listener notification failed");
995 TRACE((
"sbLocalDatabaseAsyncGUIDArray[0x%x] - Background Thread End",
mFriendArray));
1004 mWeakListener(aWeakReference)
1006 NS_ASSERTION(mWeakListener,
"aWeakReference is null");
1015 already_AddRefed<sbILocalDatabaseAsyncGUIDArrayListener>
1018 nsCOMPtr<sbILocalDatabaseAsyncGUIDArrayListener> strongListener =
1019 do_QueryReferent(mWeakListener);
1020 if (!strongListener) {
1025 NS_ADDREF(listenerPtr);
1029 #define SB_TRY_NOTIFY(call) \
1030 nsCOMPtr<sbILocalDatabaseAsyncGUIDArrayListener> listener = \
1033 return listener->call; \
1038 sbWeakAsyncListenerWrapper::OnGetLength(PRUint32 aLength,
1045 sbWeakAsyncListenerWrapper::OnGetGuidByIndex(PRUint32 aIndex,
1046 const nsAString& aGUID,
1053 sbWeakAsyncListenerWrapper::OnGetSortPropertyValueByIndex(PRUint32 aIndex,
1054 const nsAString& aPropertySortValue,
1057 SB_TRY_NOTIFY(OnGetSortPropertyValueByIndex(aIndex, aPropertySortValue, aResult))
1061 sbWeakAsyncListenerWrapper::OnGetMediaItemIdByIndex(PRUint32 aIndex,
1062 PRUint32 aMediaItemId,
1065 SB_TRY_NOTIFY(OnGetMediaItemIdByIndex(aIndex, aMediaItemId, aResult))
1069 sbWeakAsyncListenerWrapper::OnStateChange(PRUint32 aState)
1088 nsIProxyObjectManager *aProxyObjMgr,
1089 nsIWeakReference* aWeakListener)
1091 NS_ENSURE_ARG_POINTER(aProxyObjMgr);
1092 NS_ASSERTION(aWeakListener,
"aWeakListener is null");
1095 mRef = do_QueryInterface(aWeakListener, &rv);
1096 NS_ENSURE_SUCCESS(rv, rv);
1099 NS_ENSURE_TRUE(mWeakListenerWrapper, NS_ERROR_OUT_OF_MEMORY);
1103 NS_PROXY_TO_CURRENT_THREAD,
1106 mWeakListenerWrapper,
1107 NS_PROXY_ASYNC | NS_PROXY_ALWAYS,
1108 getter_AddRefs(mProxiedListener));
1109 NS_ENSURE_SUCCESS(rv, rv);
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
friend class CommandProcessor
static nsCOMPtr< nsIObserverService > observerService
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
#define SB_LOCALDATABASE_ASYNCGUIDARRAY_THREAD_TIMEOUT
virtual ~sbLocalDatabaseAsyncGUIDArray()
nsresult InitalizeThread()
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
sbLocalDatabaseAsyncGUIDArray * mFriendArray
~sbWeakAsyncListenerWrapper()
#define SB_TRY_NOTIFY(call)
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
sbLocalDatabaseAsyncGUIDArrayListenerInfo()
nsresult do_GetProxyForObject(nsIEventTarget *aTarget, REFNSIID aIID, nsISupports *aObj, PRInt32 aProxyType, void **aProxyObject)
const unsigned long STATE_IDLE
const unsigned long STATE_BUSY
nsresult EnqueueCommand(CommandType aType, PRUint32 aIndex)
already_AddRefed< sbILocalDatabaseAsyncGUIDArrayListener > GetListener()
nsresult Init(nsIProxyObjectManager *aProxyObjMgr, nsIWeakReference *aWeakListener)
nsresult ShutdownThread()
const sbCreateProxiedComponent do_ProxiedGetService(const nsCID &aCID, nsresult *error=0)
static const char kShutdownMessage[]
NS_DECL_ISUPPORTS NS_DECL_SBILOCALDATABASEGUIDARRAY NS_DECL_SBILOCALDATABASEASYNCGUIDARRAY NS_DECL_NSIOBSERVER nsresult Init()
readonly attribute unsigned long length
NS_IMPL_THREADSAFE_ISUPPORTS4(sbLocalDatabaseAsyncGUIDArray, sbILocalDatabaseGUIDArray, sbILocalDatabaseAsyncGUIDArray, nsIObserver, nsISupportsWeakReference) sbLocalDatabaseAsyncGUIDArray
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
restoreHistoryPrecursor aCount
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
nsresult do_GetProxyForObjectWithManager(nsIProxyObjectManager *aProxyObjMgr, nsIEventTarget *aTarget, REFNSIID aIID, nsISupports *aObj, PRInt32 aProxyType, void **aProxyObject)
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
_getSelectedPageStyle s i
_updateTextAndScrollDataForFrame aData
NS_IMPL_THREADSAFE_ISUPPORTS1(sbWeakAsyncListenerWrapper, sbILocalDatabaseAsyncGUIDArrayListener) sbWeakAsyncListenerWrapper
~sbLocalDatabaseAsyncGUIDArrayListenerInfo()