sbDeviceLibrary.cpp File Reference
#include "sbDeviceLibrary.h"
#include <nsIClassInfoImpl.h>
#include <nsIProgrammingLanguage.h>
#include <nsIFileURL.h>
#include <nsIPrefBranch.h>
#include <nsIPrefService.h>
#include <nsISupportsPrimitives.h>
#include <nsIVariant.h>
#include <nsIWritablePropertyBag2.h>
#include <prlog.h>
#include <prprf.h>
#include <prtime.h>
#include <nsAppDirectoryServiceDefs.h>
#include <nsArrayUtils.h>
#include <nsAutoLock.h>
#include <nsAutoPtr.h>
#include <nsCOMArray.h>
#include <sbProxiedComponentManager.h>
#include <nsComponentManagerUtils.h>
#include <nsDirectoryServiceUtils.h>
#include <nsIFile.h>
#include <nsILocalFile.h>
#include <nsMemory.h>
#include <nsServiceManagerUtils.h>
#include <nsThreadUtils.h>
#include <nsXPCOM.h>
#include <nsXPCOMCIDInternal.h>
#include <sbIDevice.h>
#include <sbIDeviceCapabilities.h>
#include <sbIDeviceContent.h>
#include <sbIDeviceEvent.h>
#include <sbIDeviceEventTarget.h>
#include <sbIDeviceManager.h>
#include <sbIDeviceProperties.h>
#include <sbILibraryFactory.h>
#include <sbILibraryManager.h>
#include <sbILocalDatabaseSmartMediaList.h>
#include <sbIPrompter.h>
#include <sbIPropertyArray.h>
#include <sbIPropertyManager.h>
#include <sbDeviceLibraryHelpers.h>
#include "sbDeviceLibrarySyncSettings.h"
#include <sbDeviceUtils.h>
#include <sbLibraryUtils.h>
#include <sbLocalDatabaseCID.h>
#include <sbMemoryUtils.h>
#include <sbPropertiesCID.h>
#include <sbStandardDeviceProperties.h>
#include <sbStandardProperties.h>
#include <sbStringUtils.h>
#include <sbVariantUtils.h>

Go to the source code of this file.

Macros

#define SB_AUDIO_SMART_PLAYLIST   "<sbaudio>"
 
#define TRACE(args)   /* nothing */
 
#define LOG(args)   /* nothing */
 
#define SB_NOTIFY_LISTENERS(call)
 
#define SB_NOTIFY_LISTENERS_RETURN_FALSE(call)
 
#define SB_NOTIFY_LISTENERS_ASK_PERMISSION(call)
 

Functions

NS_INTERFACE_MAP_END NS_IMPL_CI_INTERFACE_GETTER6 (sbDeviceLibrary, nsIClassInfo, sbIDeviceLibrary, sbILibrary, sbIMediaList, sbIMediaItem, sbILibraryResource) sbDeviceLibrary
 

Variables

char const *const gMediaType []
 
static const char * sbDeviceLibrarySyncUpdatePropertyTable []
 

Macro Definition Documentation

#define LOG (   args)    /* nothing */
#define SB_AUDIO_SMART_PLAYLIST   "<sbaudio>"

Definition at line 90 of file sbDeviceLibrary.cpp.

#define SB_NOTIFY_LISTENERS (   call)
Value:
nsCOMArray<sbIDeviceLibraryListener> listeners; \
{ \
nsAutoMonitor monitor(mMonitor); \
mListeners.EnumerateRead(AddListenersToCOMArrayCallback, &listeners); \
} \
\
PRInt32 count = listeners.Count(); \
for (PRInt32 index = 0; index < count; index++) { \
nsCOMPtr<sbIDeviceLibraryListener> listener = listeners.ObjectAt(index); \
NS_ASSERTION(listener, "Null listener!"); \
listener->call; \
} \
for(let i=0;i< aHistory.count;i++)
var count
Definition: test_bug7406.js:32

Definition at line 665 of file sbDeviceLibrary.cpp.

#define SB_NOTIFY_LISTENERS_ASK_PERMISSION (   call)
Value:
PRBool mShouldProcceed = PR_TRUE; \
PRBool mPerformAction = PR_TRUE; \
\
nsCOMArray<sbIDeviceLibraryListener> listeners; \
{ \
nsAutoMonitor monitor(mMonitor); \
mListeners.EnumerateRead(AddListenersToCOMArrayCallback, &listeners); \
} \
\
PRInt32 count = listeners.Count(); \
for (PRInt32 index = 0; index < count; index++) { \
nsCOMPtr<sbIDeviceLibraryListener> listener = listeners.ObjectAt(index); \
NS_ASSERTION(listener, "Null listener!"); \
listener->call/*(param, ..., &mShouldProcceed)*/; \
if (!mShouldProcceed) { \
/* Abort as soon as one returns false */ \
mPerformAction = PR_FALSE; \
break; \
} \
} \
for(let i=0;i< aHistory.count;i++)
var count
Definition: test_bug7406.js:32
if(DEBUG_DATAREMOTES)

Definition at line 687 of file sbDeviceLibrary.cpp.

#define SB_NOTIFY_LISTENERS_RETURN_FALSE (   call)
Value:
*aNoMoreForBatch = PR_FALSE; \
#define SB_NOTIFY_LISTENERS(call)

Definition at line 683 of file sbDeviceLibrary.cpp.

#define TRACE (   args)    /* nothing */

Function Documentation

NS_INTERFACE_MAP_END NS_IMPL_CI_INTERFACE_GETTER6 ( sbDeviceLibrary  ,
nsIClassInfo  ,
sbIDeviceLibrary  ,
sbILibrary  ,
sbIMediaList  ,
sbIMediaItem  ,
sbILibraryResource   
)

To log this module, set the following environment variable: NSPR_LOG_MODULES=sbDeviceLibrary:5

Definition at line 156 of file sbDeviceLibrary.cpp.

Variable Documentation

char const* const gMediaType[]
Initial value:
= {
".audio",
".video",
".image"
}

Definition at line 92 of file sbDeviceLibrary.cpp.

const char* sbDeviceLibrarySyncUpdatePropertyTable[]
static

Definition at line 100 of file sbDeviceLibrary.cpp.