27 #include <nsIClassInfoImpl.h>
28 #include <nsIProgrammingLanguage.h>
30 #include <nsAutoLock.h>
41 sbIDeviceFirmwareUpdate)
46 sbDeviceFirmwareUpdate::sbDeviceFirmwareUpdate()
48 , mFirmwareReadableVersion(NS_LITERAL_STRING("0"))
53 sbDeviceFirmwareUpdate::~sbDeviceFirmwareUpdate()
56 nsAutoMonitor::DestroyMonitor(
mMonitor);
61 sbDeviceFirmwareUpdate::GetFirmwareImageFile(nsIFile * *aFirmwareImageFile)
63 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
69 NS_ENSURE_SUCCESS(rv, rv);
75 sbDeviceFirmwareUpdate::GetFirmwareReadableVersion(nsAString & aFirmwareReadableVersion)
77 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
86 sbDeviceFirmwareUpdate::GetFirmwareVersion(PRUint32 *aFirmwareVersion)
88 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
89 NS_ENSURE_ARG_POINTER(aFirmwareVersion);
98 const nsAString & aFirmwareReadableVersion,
99 PRUint32 aFirmwareVersion)
101 NS_ENSURE_ARG_POINTER(aFirmwareImageFile);
103 mMonitor = nsAutoMonitor::NewMonitor(
"sbDeviceFirmwareUpdate::mMonitor");
104 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_OUT_OF_MEMORY);
PRUint32 mFirmwareVersion
NS_IMPL_QUERY_INTERFACE2_CI(sbDeviceFirmwareUpdate, sbIDeviceFirmwareUpdate, nsIClassInfo) NS_IMPL_CI_INTERFACE_GETTER1(sbDeviceFirmwareUpdate
nsCOMPtr< nsIFile > mFirmwareImageFile
NS_IMPL_THREADSAFE_RELEASE(sbRequestItem)
NS_IMPL_THREADSAFE_ADDREF(sbRequestItem)
nsString mFirmwareReadableVersion
NS_INTERFACE_MAP_END NS_IMPL_CI_INTERFACE_GETTER1(CDatabaseQuery, sbIDatabaseQuery) CDatabaseQuery