sbLocalDatabasePropertyCache.cpp File Reference
#include "sbLocalDatabasePropertyCache.h"
#include <sbIDatabaseQuery.h>
#include <sbILibraryManager.h>
#include <sbIPropertyManager.h>
#include <sbPropertiesCID.h>
#include <DatabaseQuery.h>
#include <nsAutoLock.h>
#include <nsCOMArray.h>
#include <nsComponentManagerUtils.h>
#include <nsIObserverService.h>
#include <nsIProxyObjectManager.h>
#include <nsServiceManagerUtils.h>
#include <nsIThreadManager.h>
#include <nsThreadUtils.h>
#include <nsUnicharUtils.h>
#include <nsXPCOM.h>
#include <nsXPCOMCIDInternal.h>
#include <prlog.h>
#include <nsIClassInfoImpl.h>
#include <nsIProgrammingLanguage.h>
#include <nsMemory.h>
#include <nsIStringBundle.h>
#include <nsIPrefBranch.h>
#include <nsIPrefService.h>
#include "sbDatabaseResultStringEnumerator.h"
#include "sbLocalDatabaseGUIDArray.h"
#include "sbLocalDatabaseLibrary.h"
#include "sbLocalDatabaseResourcePropertyBag.h"
#include "sbLocalDatabaseSchemaInfo.h"
#include <sbIJobProgressService.h>
#include <sbTArrayStringEnumerator.h>
#include <sbStringBundle.h>
#include <sbStringUtils.h>
#include <sbMediaListBatchCallback.h>
#include <sbIPropertyArray.h>
#include <sbIPropertyInfo.h>
#include "sbLocalDatabaseSQL.h"
#include <sbThreadPoolService.h>
#include <sbDebugUtils.h>
Include dependency graph for sbLocalDatabasePropertyCache.cpp:

Go to the source code of this file.

Classes

class  PRUnicharAdaptor
 
class  DirtyPropertyEnumerator
 
struct  DirtyItems
 

Macros

#define SB_LOCALDATABASE_CACHE_FLUSH_DELAY   (1000)
 Number of milliseconds after the last write to force a cache write. More...
 
#define CACHE_HASHTABLE_SIZE   500
 
#define SORTINVALIDATE_TIMER_PERIOD   50
 Number of milliseconds between sbIJobProgress notifications for sbLocalDatabaseSortInvalidateJob. More...
 
#define NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID   "xpcom-shutdown-threads"
 
#define NS_FINAL_UI_STARTUP_OBSERVER_ID   "final-ui-startup"
 

Functions

 NS_IMPL_THREADSAFE_ISUPPORTS2 (sbLocalDatabasePropertyCache, sbILocalDatabasePropertyCache, nsIObserver) sbLocalDatabasePropertyCache
 
template<class T >
PRUint32 GetGUIDCount (T const &aGUIDs, PRInt32 aLibraryItemPosition)
 
 EnumDirtyProps (nsUint32HashKey *aKey, void *aClosure)
 
 EnumDirtyItems (nsAString const &aKey, sbLocalDatabaseResourcePropertyBag *aBag, void *aClosure)
 
 EnumDirtyItemsSetDirty (nsAString const &aKey, sbLocalDatabaseResourcePropertyBag *aBag, void *aClosure)
 
 NS_IMPL_THREADSAFE_ISUPPORTS5 (sbLocalDatabaseSortInvalidateJob, nsIClassInfo, sbIJobProgress, nsIRunnable, sbIMediaListEnumerationListener, nsIObserver)
 
 NS_IMPL_CI_INTERFACE_GETTER5 (sbLocalDatabaseSortInvalidateJob, nsIClassInfo, sbIJobProgress, nsIRunnable, sbIMediaListEnumerationListener, nsIObserver) sbLocalDatabaseSortInvalidateJob
 

Macro Definition Documentation

#define CACHE_HASHTABLE_SIZE   500

Definition at line 80 of file sbLocalDatabasePropertyCache.cpp.

#define NS_FINAL_UI_STARTUP_OBSERVER_ID   "final-ui-startup"

Definition at line 90 of file sbLocalDatabasePropertyCache.cpp.

#define NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID   "xpcom-shutdown-threads"

Definition at line 89 of file sbLocalDatabasePropertyCache.cpp.

#define SB_LOCALDATABASE_CACHE_FLUSH_DELAY   (1000)

Number of milliseconds after the last write to force a cache write.

Definition at line 78 of file sbLocalDatabasePropertyCache.cpp.

#define SORTINVALIDATE_TIMER_PERIOD   50

Number of milliseconds between sbIJobProgress notifications for sbLocalDatabaseSortInvalidateJob.

Definition at line 87 of file sbLocalDatabasePropertyCache.cpp.

Function Documentation

EnumDirtyItems ( nsAString const &  aKey,
sbLocalDatabaseResourcePropertyBag aBag,
void *  aClosure 
)

Definition at line 1103 of file sbLocalDatabasePropertyCache.cpp.

EnumDirtyItemsSetDirty ( nsAString const &  aKey,
sbLocalDatabaseResourcePropertyBag aBag,
void *  aClosure 
)

Definition at line 1115 of file sbLocalDatabasePropertyCache.cpp.

EnumDirtyProps ( nsUint32HashKey *  aKey,
void *  aClosure 
)

Definition at line 1085 of file sbLocalDatabasePropertyCache.cpp.

Here is the call graph for this function:

template<class T >
PRUint32 GetGUIDCount ( T const &  aGUIDs,
PRInt32  aLibraryItemPosition 
)
inline

This takes in to account the missing library guid when getting the guid count. This represents the current logical guid count and is mainly for debug purposes. Since it's inline no need of message if's

Definition at line 564 of file sbLocalDatabasePropertyCache.cpp.

NS_IMPL_CI_INTERFACE_GETTER5 ( sbLocalDatabaseSortInvalidateJob  ,
nsIClassInfo  ,
sbIJobProgress  ,
nsIRunnable  ,
sbIMediaListEnumerationListener  ,
nsIObserver   
)

Definition at line 1826 of file sbLocalDatabasePropertyCache.cpp.

NS_IMPL_THREADSAFE_ISUPPORTS2 ( sbLocalDatabasePropertyCache  ,
sbILocalDatabasePropertyCache  ,
nsIObserver   
)

Definition at line 93 of file sbLocalDatabasePropertyCache.cpp.

NS_IMPL_THREADSAFE_ISUPPORTS5 ( sbLocalDatabaseSortInvalidateJob  ,
nsIClassInfo  ,
sbIJobProgress  ,
nsIRunnable  ,
sbIMediaListEnumerationListener  ,
nsIObserver   
)