sbDeviceEvent Class Reference

#include <sbDeviceEvent.h>

Inheritance diagram for sbDeviceEvent:
[legend]
Collaboration diagram for sbDeviceEvent:
[legend]

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_SBIDEVICEEVENT
nsresult 
InitEvent (PRUint32 aType, nsIVariant *aData, nsISupports *aOrigin, PRUint32 aDeviceState, PRUint32 aDeviceSubState)
 
virtual void Dispatch ()
 
virtual PRBool WasDispatched ()
 
virtual nsresult SetTarget (sbIDeviceEventTarget *aTarget)
 

Static Public Member Functions

static sbDeviceEventCreateEvent ()
 
static nsresult CreateEvent (PRUint32 aType, nsIVariant *aData, nsISupports *aOrigin, PRUint32 aDeviceState, PRUint32 aDeviceSubState, sbIDeviceEvent **_retval)
 

Protected Member Functions

 sbDeviceEvent ()
 
 ~sbDeviceEvent ()
 

Protected Attributes

PRUint32 mType
 
nsCOMPtr< nsIVariant > mData
 
nsCOMPtr< sbIDeviceEventTargetmTarget
 
nsCOMPtr< nsISupportsmOrigin
 
PRBool mWasDispatched
 
PRUint32 mDeviceState
 
PRUint32 mDeviceSubState
 

Additional Inherited Members

- Public Attributes inherited from sbIDeviceEvent
const unsigned long COMMAND_DEVICE_BASE = 0x00000000
 
const unsigned long COMMAND_DEVICE_RESET = COMMAND_DEVICE_BASE + 1
 
const unsigned long COMMAND_DEVICE_POWER_DOWN = COMMAND_DEVICE_BASE + 2
 
const unsigned long COMMAND_DEVICE_POWER_UP = COMMAND_DEVICE_BASE + 3
 
const unsigned long COMMAND_DEVICE_MEDIA_EJECT = COMMAND_DEVICE_BASE + 4
 
const unsigned long COMMAND_DEVICE_MEDIA_FORMAT = COMMAND_DEVICE_BASE + 5
 
const unsigned long COMMAND_CONTROLLER_BASE = 0x00020000
 
const unsigned long COMMAND_CONTROLLER_RESET = COMMAND_CONTROLLER_BASE + 1
 
const unsigned long COMMAND_MARSHALL_BASE = 0x00040000
 
const unsigned long COMMAND_MARSHALL_RESET = COMMAND_MARSHALL_BASE + 1
 
const unsigned long COMMAND_MANAGER_BASE = 0x00060000
 
const unsigned long COMMAND_MANAGER_REFRESH = COMMAND_MANAGER_BASE + 1
 
const unsigned long COMMAND_CLIENT_DEFINED = 0x20000000
 
const unsigned long EVENT_DEVICE_BASE = 0x40000000
 
const unsigned long EVENT_DEVICE_ADDED = EVENT_DEVICE_BASE + 1
 
const unsigned long EVENT_DEVICE_REMOVED = EVENT_DEVICE_BASE + 2
 
const unsigned long EVENT_DEVICE_RESET = EVENT_DEVICE_BASE + 3
 
const unsigned long EVENT_DEVICE_MEDIA_INSERTED = EVENT_DEVICE_BASE + 4
 
const unsigned long EVENT_DEVICE_MEDIA_REMOVED = EVENT_DEVICE_BASE + 5
 
const unsigned long EVENT_DEVICE_TRANSFER_START = EVENT_DEVICE_BASE + 6
 
const unsigned long EVENT_DEVICE_TRANSFER_PROGRESS = EVENT_DEVICE_BASE + 7
 
const unsigned long EVENT_DEVICE_TRANSFER_END = EVENT_DEVICE_BASE + 8
 
const unsigned long EVENT_DEVICE_MOUNTING_START = EVENT_DEVICE_BASE + 9
 
const unsigned long EVENT_DEVICE_MOUNTING_PROGRESS = EVENT_DEVICE_BASE + 10
 
const unsigned long EVENT_DEVICE_MOUNTING_END = EVENT_DEVICE_BASE + 11
 
const unsigned long EVENT_DEVICE_READY = EVENT_DEVICE_BASE + 12
 
const unsigned long EVENT_DEVICE_MEDIA_READ_START = EVENT_DEVICE_BASE + 13
 
const unsigned long EVENT_DEVICE_MEDIA_READ_END = EVENT_DEVICE_BASE + 14
 
const unsigned long EVENT_DEVICE_MEDIA_READ_FAILED = EVENT_DEVICE_BASE + 15
 
const unsigned long EVENT_DEVICE_MEDIA_WRITE_START = EVENT_DEVICE_BASE + 16
 
const unsigned long EVENT_DEVICE_MEDIA_WRITE_END = EVENT_DEVICE_BASE + 17
 
const unsigned long EVENT_DEVICE_MEDIA_WRITE_FAILED = EVENT_DEVICE_BASE + 18
 
const unsigned long EVENT_DEVICE_INFO_CHANGED = EVENT_DEVICE_BASE + 19
 
const unsigned long EVENT_DEVICE_MEDIA_READ_UNSUPPORTED_TYPE = EVENT_DEVICE_BASE + 20
 
const unsigned long EVENT_DEVICE_MEDIA_WRITE_UNSUPPORTED_TYPE = EVENT_DEVICE_BASE + 21
 
const unsigned long EVENT_DEVICE_ACCESS_DENIED = EVENT_DEVICE_BASE + 22
 
const unsigned long EVENT_DEVICE_NOT_ENOUGH_FREESPACE = EVENT_DEVICE_BASE + 23
 
const unsigned long EVENT_DEVICE_NOT_AVAILABLE = EVENT_DEVICE_BASE + 24
 
const unsigned long EVENT_DEVICE_ERROR_UNEXPECTED = EVENT_DEVICE_BASE + 25
 
const unsigned long EVENT_DEVICE_STATE_CHANGED = EVENT_DEVICE_BASE + 26
 
const unsigned long EVENT_DEVICE_PREFS_CHANGED = EVENT_DEVICE_BASE + 27
 
const unsigned long EVENT_DEVICE_TRANSCODE_START = EVENT_DEVICE_BASE + 28
 
const unsigned long EVENT_DEVICE_TRANSCODE_PROGRESS = EVENT_DEVICE_BASE + 29
 
const unsigned long EVENT_DEVICE_TRANSCODE_END = EVENT_DEVICE_BASE + 30
 
const unsigned long EVENT_DEVICE_TRANSCODE_ERROR = EVENT_DEVICE_BASE + 31
 
const unsigned long EVENT_DEVICE_LIBRARY_ADDED = EVENT_DEVICE_BASE + 32
 
const unsigned long EVENT_DEVICE_LIBRARY_REMOVED = EVENT_DEVICE_BASE + 33
 
const unsigned long EVENT_DEVICE_DEFAULT_LIBRARY_CHANGED = EVENT_DEVICE_BASE + 34
 
const unsigned long EVENT_DEVICE_FORMATTING_START = EVENT_DEVICE_BASE + 35
 
const unsigned long EVENT_DEVICE_FORMATTING_PROGRESS = EVENT_DEVICE_BASE + 36
 
const unsigned long EVENT_DEVICE_FORMATTING_END = EVENT_DEVICE_BASE + 37
 
const unsigned long EVENT_DEVICE_FILE_MISSING = EVENT_DEVICE_BASE + 38
 
const unsigned long EVENT_DEVICE_SCAN_START = EVENT_DEVICE_BASE + 39
 
const unsigned long EVENT_DEVICE_SCAN_END = EVENT_DEVICE_BASE + 40
 
const unsigned long EVENT_DEVICE_BEFORE_ADDED = EVENT_DEVICE_BASE + 41
 
const unsigned long EVENT_DEVICE_SYNC_TEMP_MODIFIED = EVENT_DEVICE_BASE + 42
 
const unsigned long EVENT_DEVICE_SYNC_SETTINGS_CHANGED = EVENT_DEVICE_BASE + 43
 
const unsigned long EVENT_DEVICE_SYNC_SETTINGS_RESET = EVENT_DEVICE_BASE + 44
 
const unsigned long EVENT_DEVICE_DOWNLOAD_START = EVENT_DEVICE_BASE + 45
 
const unsigned long EVENT_DEVICE_DOWNLOAD_PROGRESS = EVENT_DEVICE_BASE + 46
 
const unsigned long EVENT_DEVICE_DOWNLOAD_END = EVENT_DEVICE_BASE + 47
 
const unsigned long EVENT_DEVICE_DOWNLOAD_ERROR = EVENT_DEVICE_BASE + 48
 
const unsigned long EVENT_CONTROLLER_BASE = 0x40020000
 
const unsigned long EVENT_MARSHALL_BASE = 0x40040000
 
const unsigned long EVENT_MANAGER_BASE = 0x40060000
 
const unsigned long EVENT_FIRMWARE_BASE = 0x40080000
 Base Firmware Event Value, this event is never sent. More...
 
const unsigned long EVENT_FIRMWARE_CFU_START = EVENT_FIRMWARE_BASE + 1
 Check for update start. More...
 
const unsigned long EVENT_FIRMWARE_CFU_END = EVENT_FIRMWARE_BASE + 2
 Check for update end. More...
 
const unsigned long EVENT_FIRMWARE_DOWNLOAD_START = EVENT_FIRMWARE_BASE + 3
 Firmware download start. More...
 
const unsigned long EVENT_FIRMWARE_DOWNLOAD_PROGRESS = EVENT_FIRMWARE_BASE + 4
 Firmware download progress. More...
 
const unsigned long EVENT_FIRMWARE_DOWNLOAD_END = EVENT_FIRMWARE_BASE + 5
 Firmware download end. More...
 
const unsigned long EVENT_FIRMWARE_UPDATE_START = EVENT_FIRMWARE_BASE + 6
 Firmware update start. More...
 
const unsigned long EVENT_FIRMWARE_UPDATE_END = EVENT_FIRMWARE_BASE + 7
 Firmware update end. More...
 
const unsigned long EVENT_FIRMWARE_WRITE_START = EVENT_FIRMWARE_BASE + 8
 Firmware write to device start. More...
 
const unsigned long EVENT_FIRMWARE_WRITE_PROGRESS = EVENT_FIRMWARE_BASE + 9
 Firmware write to device start. More...
 
const unsigned long EVENT_FIRMWARE_WRITE_END = EVENT_FIRMWARE_BASE + 10
 Firmware write to device start. More...
 
const unsigned long EVENT_FIRMWARE_VERIFY_START = EVENT_FIRMWARE_BASE + 11
 Firmware verify device start. More...
 
const unsigned long EVENT_FIRMWARE_VERIFY_PROGRESS = EVENT_FIRMWARE_BASE + 12
 Firmware verify device progress. More...
 
const unsigned long EVENT_FIRMWARE_VERIFY_END = EVENT_FIRMWARE_BASE + 13
 Firmware verify device end. More...
 
const unsigned long EVENT_FIRMWARE_ERROR_BASE = 0x40100000
 Base value for firmware errors, this event is never sent. More...
 
const unsigned long EVENT_FIRMWARE_ERROR_UNKNOWN = EVENT_FIRMWARE_ERROR_BASE + 1
 Generic error. More...
 
const unsigned long EVENT_FIRMWARE_CFU_ERROR = EVENT_FIRMWARE_ERROR_BASE + 2
 Check for update error. More...
 
const unsigned long EVENT_FIRMWARE_DOWNLOAD_ERROR = EVENT_FIRMWARE_ERROR_BASE + 3
 Firmware download error. More...
 
const unsigned long EVENT_FIRMWARE_UPDATE_ERROR = EVENT_FIRMWARE_ERROR_BASE + 4
 Firmware update error. More...
 
const unsigned long EVENT_FIRMWARE_WRITE_ERROR = EVENT_FIRMWARE_ERROR_BASE + 5
 Firmware write error. More...
 
const unsigned long EVENT_FIRMWARE_NEEDREC_ERROR = EVENT_FIRMWARE_ERROR_BASE + 6
 Firmware update requires recovery mode to be put on the device. More...
 
const unsigned long EVENT_CLIENT_DEFINED = 0x60000000
 
readonly attribute PRUint32 type
 
readonly attribute nsIVariant data
 
readonly attribute
sbIDeviceEventTarget 
target
 
readonly attribute nsISupports origin
 
readonly attribute unsigned long deviceState
 
readonly attribute unsigned long deviceSubState
 

Detailed Description

Definition at line 40 of file sbDeviceEvent.h.

Constructor & Destructor Documentation

sbDeviceEvent::sbDeviceEvent ( )
protected

Definition at line 45 of file sbDeviceEvent.cpp.

Here is the caller graph for this function:

sbDeviceEvent::~sbDeviceEvent ( )
protected

Definition at line 54 of file sbDeviceEvent.cpp.

Member Function Documentation

static sbDeviceEvent* sbDeviceEvent::CreateEvent ( )
static
nsresult sbDeviceEvent::CreateEvent ( PRUint32  aType,
nsIVariant *  aData,
nsISupports aOrigin,
PRUint32  aDeviceState,
PRUint32  aDeviceSubState,
sbIDeviceEvent **  _retval 
)
static

Definition at line 113 of file sbDeviceEvent.cpp.

Here is the call graph for this function:

virtual void sbDeviceEvent::Dispatch ( )
inlinevirtual

Definition at line 59 of file sbDeviceEvent.h.

nsresult sbDeviceEvent::InitEvent ( PRUint32  aType,
nsIVariant *  aData,
nsISupports aOrigin,
PRUint32  aDeviceState,
PRUint32  aDeviceSubState 
)

Definition at line 59 of file sbDeviceEvent.cpp.

nsresult sbDeviceEvent::SetTarget ( sbIDeviceEventTarget aTarget)
virtual

Definition at line 91 of file sbDeviceEvent.cpp.

virtual PRBool sbDeviceEvent::WasDispatched ( )
inlinevirtual

Definition at line 60 of file sbDeviceEvent.h.

Member Data Documentation

nsCOMPtr<nsIVariant> sbDeviceEvent::mData
protected

Definition at line 75 of file sbDeviceEvent.h.

PRUint32 sbDeviceEvent::mDeviceState
protected

Definition at line 79 of file sbDeviceEvent.h.

PRUint32 sbDeviceEvent::mDeviceSubState
protected

Definition at line 80 of file sbDeviceEvent.h.

nsCOMPtr<nsISupports> sbDeviceEvent::mOrigin
protected

Definition at line 77 of file sbDeviceEvent.h.

nsCOMPtr<sbIDeviceEventTarget> sbDeviceEvent::mTarget
protected

Definition at line 76 of file sbDeviceEvent.h.

PRUint32 sbDeviceEvent::mType
protected

Definition at line 74 of file sbDeviceEvent.h.

PRBool sbDeviceEvent::mWasDispatched
protected

Definition at line 78 of file sbDeviceEvent.h.


The documentation for this class was generated from the following files: