25 #include "nsISupports.idl"
41 [scriptable,
uuid(caf2294b-da39-48ac-859a-6ebfd4433eeb)]
187 in
unsigned long aDeviceVendorID,
188 in
unsigned long aDeviceProductID);
203 [optional] in
unsigned long aDeviceVendorID,
204 [optional] in
unsigned long aDeviceProductID);
274 #include <nsIComponentManager.h>
275 #include <nsICategoryManager.h>
276 #include <nsIGenericFactory.h>
277 #include <nsIServiceManager.h>
279 #include <nsCOMPtr.h>
280 #include <nsServiceManagerUtils.h>
281 #include <nsStringGlue.h>
282 #include <nsXPCOMCID.h>
285 struct nsModuleComponentInfo;
287 #define SB_DEVICE_FIRMWARE_HANDLER_CATEGORY "songbird-device-firmware-handler"
310 #define SB_DEVICE_FIRMWARE_HANDLER_REGISTERSELF(_name) \
312 NS_METHOD _name##RegisterSelf(nsIComponentManager* aCompMgr, \
314 const char* registryLocation, \
315 const char* componentType, \
316 const nsModuleComponentInfo* info); \
318 NS_METHOD _name##UnregisterSelf(nsIComponentManager* aCompMgr, \
320 const char* registryLocation, \
321 const nsModuleComponentInfo* info)
326 #define SB_DEVICE_FIRMWARE_HANLDER_REGISTERSELF_IMPL(_name, _desc) \
329 _name##RegisterSelf(nsIComponentManager* aCompMgr, \
331 const char* registryLocation, \
332 const char* componentType, \
333 const nsModuleComponentInfo* info) \
336 nsCOMPtr<nsICategoryManager> catMan = \
337 do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
338 NS_ENSURE_SUCCESS(rv, rv); \
339 nsCAutoString prevEntry; \
340 rv = catMan->AddCategoryEntry(SB_DEVICE_FIRMWARE_HANDLER_CATEGORY, \
344 getter_Copies(prevEntry)); \
345 NS_ENSURE_SUCCESS(rv, rv); \
346 NS_WARN_IF_FALSE(prevEntry.IsEmpty(), \
347 "Another controller was registered with that id!"); \
352 _name##UnregisterSelf(nsIComponentManager* aCompMgr, \
354 const char* registryLocation, \
355 const nsModuleComponentInfo* info) \
358 nsCOMPtr<nsICategoryManager> catMan = \
359 do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
360 NS_ENSURE_SUCCESS(rv, rv); \
361 rv = catMan->DeleteCategoryEntry(SB_DEVICE_FIRMWARE_HANDLER_CATEGORY, \
364 NS_ENSURE_SUCCESS(rv, rv); \
void update(in sbIDeviceFirmwareUpdate aFirmwareUpdate)
Perform a firmware update on the specified device.
readonly attribute AString latestFirmwareReadableVersion
The latest firmware version, in human readable format.
readonly attribute boolean needsRecoveryMode
Whether the device needs to be in recovery mode to have its firmware updated.
readonly attribute boolean recoveryMode
Indicates whether the device is in recovery mode or not.
void bind(in sbIDevice aDevice, in sbIDeviceEventListener aListener)
Bind the handler to a device.
readonly attribute unsigned long currentFirmwareVersion
The current firmware version, in machine friendly format.
void verifyDevice()
Verify the firmware already on the device.
readonly attribute nsIURI latestFirmwareLocation
URI for latest firmware (where it can be downloaded from).
boolean rebind(in sbIDevice aDevice, in sbIDeviceEventListener aListener)
Rebind a device to an already running handler.
readonly attribute AString deviceModelNumber
Device model number / name as reported by the firmware handler.
boolean canUpdate(in sbIDevice aDevice, in unsigned long aDeviceVendorID, in unsigned long aDeviceProductID)
Check to see if this handler can update the specified device.
readonly attribute unsigned long latestFirmwareVersion
The latest firmware version, in machine friendly format.
void unbind()
Unbind the handler.
readonly attribute nsIURI registerLocation
Location where one can perform owner registration with the device manufacturer.
void cancel()
Cancel the current operation.
readonly attribute sbIDevice boundDevice
The device bound to this handler, or null.
readonly attribute nsIURI releaseNotesLocation
Location for the release notes of the latest firmware.
readonly attribute AString deviceVendor
Device manufacturer as reported by the firmware handler.
void recover(in sbIDeviceFirmwareUpdate aFirmwareUpdate)
Perform a recovery update on the specified device.
readonly attribute AString currentFirmwareReadableVersion
The current firmware version on the device, in human readable format (eg. xx.xx.xx.xx).
readonly attribute AString recoveryModeKeyCombination
Magic key combination required by the device to go into recovery or firmware flashing mode...
void verifyUpdate(in sbIDeviceFirmwareUpdate aFirmwareUpdate)
Verify the firmware update image.
readonly attribute sbIDeviceFirmwareUpdate defaultFirmwareUpdate
The default firmware update that is packaged with the firmware handler. This update should always be ...
void refreshInfo()
Refresh the firmware location, version, readable version, notes, and instructions.
readonly attribute nsISimpleEnumerator supportedDevices
Array containing the list of devices supported by the firmware handler.
readonly attribute AString deviceModelVersion
Device model version / version name as reported by the firmware handler.
readonly attribute AString contractId
The Contract ID for this handler.
readonly attribute nsIURI customerSupportLocation
Device Customer Support URL.
readonly attribute nsIURI resetInstructionsLocation
Location of the reset instructions.
void initiateRecoveryModeSwitch([optional] in unsigned long aDeviceVendorID, [optional] in unsigned long aDeviceProductID)
Notify the handler to expect a device to connect in recovery mode.