25 #ifndef SBDEVICELIBRARYSYNCSETTINGS_H_
26 #define SBDEVICELIBRARYSYNCSETTINGS_H_
29 #include <nsAutoLock.h>
30 #include <nsAutoPtr.h>
32 #include <nsInterfaceHashtable.h>
36 #include <sbIDeviceLibrary.h>
37 #include <sbIDeviceLibrarySyncSettings.h>
38 #include <sbIDeviceLibraryMediaSyncSettings.h>
47 NS_DECL_SBIDEVICELIBRARYSYNCSETTINGS
66 nsID
const & aDeviceID,
67 nsAString
const & aDeviceLibraryGuid);
70 nsAString
const & aDeviceLibraryGuid);
73 nsresult GetMediaSettingsNoLock(
77 nsresult GetMgmtTypePref(
sbIDevice * aDevice,
78 PRUint32 aContentType,
79 PRUint32 & aMgmtTypes);
89 nsresult GetImportPref(
sbIDevice * aDevice,
93 static nsresult ReadAString(
sbIDevice * aDevice,
94 nsAString
const & aPrefKey,
96 nsAString
const & aDefault);
100 nsAString
const & aPrefKey,
103 nsresult WriteMediaSyncSettings(
108 nsresult ReadMediaSyncSettings(
114 nsresult GetMgmtTypePrefKey(PRUint32 aContentType, nsAString& aPrefKey);
122 nsresult GetImportPrefKey(PRUint32 aMediaType,
123 nsAString& aPrefKey);
125 nsresult GetSyncListsPrefKey(PRUint32 aContentType, nsAString& aPrefKey);
127 nsresult GetSyncFromFolderPrefKey(PRUint32 aContentType, nsAString& aPrefKey);
129 nsresult GetSyncFolderPrefKey(PRUint32 aContentType, nsAString& aPrefKey);
131 nsTArray<nsRefPtr<sbDeviceLibraryMediaSyncSettings> > mMediaSettings;
134 nsString mDeviceLibraryGuid;
nsresult CreateCopy(sbDeviceLibrarySyncSettings **aSettings)
NS_DECL_ISUPPORTS NS_DECL_SBIDEVICELIBRARYSYNCSETTINGS nsresult Assign(sbDeviceLibrarySyncSettings *aSource)
static sbDeviceLibrarySyncSettings * New(nsID const &aDeviceID, nsAString const &aDeviceLibraryGuid)
nsresult Read(sbIDevice *aDevice, sbIDeviceLibrary *aDeviceLibrary)