sbIDeviceEvent.idl
Go to the documentation of this file.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 :miv */
3 /*
4  *=BEGIN SONGBIRD GPL
5  *
6  * This file is part of the Songbird web player.
7  *
8  * Copyright(c) 2005-2010 POTI, Inc.
9  * http://www.songbirdnest.com
10  *
11  * This file may be licensed under the terms of of the
12  * GNU General Public License Version 2 (the ``GPL'').
13  *
14  * Software distributed under the License is distributed
15  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
16  * express or implied. See the GPL for the specific language
17  * governing rights and limitations.
18  *
19  * You should have received a copy of the GPL along with this
20  * program. If not, go to http://www.gnu.org/licenses/gpl.html
21  * or write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23  *
24  *=END SONGBIRD GPL
25  */
26 
27 #include "nsISupports.idl"
28 
29 interface nsIVariant;
30 
31 interface sbIDeviceEventTarget;
32 
37 [scriptable, uuid(e2b7a9e0-1dd1-11b2-a9a7-89a1ae00953e)]
39 {
43  const unsigned long COMMAND_DEVICE_BASE = 0x00000000;
44  const unsigned long COMMAND_DEVICE_RESET = COMMAND_DEVICE_BASE + 1;
46  const unsigned long COMMAND_DEVICE_POWER_UP = COMMAND_DEVICE_BASE + 3;
49 
53  const unsigned long COMMAND_CONTROLLER_BASE = 0x00020000;
55 
59  const unsigned long COMMAND_MARSHALL_BASE = 0x00040000;
60  const unsigned long COMMAND_MARSHALL_RESET = COMMAND_MARSHALL_BASE + 1;
61 
65  const unsigned long COMMAND_MANAGER_BASE = 0x00060000;
66  const unsigned long COMMAND_MANAGER_REFRESH = COMMAND_MANAGER_BASE + 1;
67 
71  const unsigned long COMMAND_CLIENT_DEFINED = 0x20000000;
72 
76  const unsigned long EVENT_DEVICE_BASE = 0x40000000;
77 
78  // the device was connected
79  const unsigned long EVENT_DEVICE_ADDED = EVENT_DEVICE_BASE + 1;
80  // the device was disconnected
81  const unsigned long EVENT_DEVICE_REMOVED = EVENT_DEVICE_BASE + 2;
82  // the device was reset
83  const unsigned long EVENT_DEVICE_RESET = EVENT_DEVICE_BASE + 3;
84 
85  // some sort of storage media was inserted into the device
87  // some sort of storage media was removed from the device
88  // (note that there may be more than one, and some may still be in the device)
89  const unsigned long EVENT_DEVICE_MEDIA_REMOVED = EVENT_DEVICE_BASE + 5;
90 
93  const unsigned long EVENT_DEVICE_TRANSFER_END = EVENT_DEVICE_BASE + 8;
94 
95  // device state changes
98  const unsigned long EVENT_DEVICE_MOUNTING_END = EVENT_DEVICE_BASE + 11;
99 
100  const unsigned long EVENT_DEVICE_READY = EVENT_DEVICE_BASE + 12;
101 
103  const unsigned long EVENT_DEVICE_MEDIA_READ_END = EVENT_DEVICE_BASE + 14;
108 
109  const unsigned long EVENT_DEVICE_INFO_CHANGED = EVENT_DEVICE_BASE + 19;
110 
111  // device transfer errors
114 
115  // device general errors
116  const unsigned long EVENT_DEVICE_ACCESS_DENIED = EVENT_DEVICE_BASE + 22;
118  const unsigned long EVENT_DEVICE_NOT_AVAILABLE = EVENT_DEVICE_BASE + 24;
119 
120  // device generic catch-all error
122 
123  // device generic state changed
124  const unsigned long EVENT_DEVICE_STATE_CHANGED = EVENT_DEVICE_BASE + 26;
125 
126  // device preferences changed
127  const unsigned long EVENT_DEVICE_PREFS_CHANGED = EVENT_DEVICE_BASE + 27;
128 
129  // device transcoding states
132  const unsigned long EVENT_DEVICE_TRANSCODE_END = EVENT_DEVICE_BASE + 30;
133 
134  // device transcoding errors
135  // the .data should be a nsIPropertyBag, with the optional properties:
136  // "mediacore-error": the sbIMediacoreError
137  // "message": a message to display to the user
138  // "item": associated sbIMediaItem
140 
141  // device library events
142  const unsigned long EVENT_DEVICE_LIBRARY_ADDED = EVENT_DEVICE_BASE + 32;
144  const unsigned long
146 
147  // device formatting events
150  const unsigned long EVENT_DEVICE_FORMATTING_END = EVENT_DEVICE_BASE + 37;
151 
152  // file that you were trying to transfer is missing
153  const unsigned long EVENT_DEVICE_FILE_MISSING = EVENT_DEVICE_BASE + 38;
154 
155  // events for device scans
156  const unsigned long EVENT_DEVICE_SCAN_START = EVENT_DEVICE_BASE + 39;
157  const unsigned long EVENT_DEVICE_SCAN_END = EVENT_DEVICE_BASE + 40;
158 
159  // special before device added event.
160  const unsigned long EVENT_DEVICE_BEFORE_ADDED = EVENT_DEVICE_BASE + 41;
161 
162  // Sync management change events
166 
167  // device downloading events
168  const unsigned long EVENT_DEVICE_DOWNLOAD_START = EVENT_DEVICE_BASE + 45;
170  const unsigned long EVENT_DEVICE_DOWNLOAD_END = EVENT_DEVICE_BASE + 47;
171 
172  // device download errors
173  // the .data should be a nsIPropertyBag, with the optional properties:
174  // "message": a message to display to the user
175  // "item": associated sbIMediaItem
176  const unsigned long EVENT_DEVICE_DOWNLOAD_ERROR = EVENT_DEVICE_BASE + 48;
177 
181  const unsigned long EVENT_CONTROLLER_BASE = 0x40020000;
182 
186  const unsigned long EVENT_MARSHALL_BASE = 0x40040000;
187 
191  const unsigned long EVENT_MANAGER_BASE = 0x40060000;
192 
196  const unsigned long EVENT_FIRMWARE_BASE = 0x40080000;
197 
208  const unsigned long EVENT_FIRMWARE_CFU_END = EVENT_FIRMWARE_BASE + 2;
244  const unsigned long EVENT_FIRMWARE_WRITE_END = EVENT_FIRMWARE_BASE + 10;
245 
257  const unsigned long EVENT_FIRMWARE_VERIFY_END = EVENT_FIRMWARE_BASE + 13;
258 
262  const unsigned long EVENT_FIRMWARE_ERROR_BASE = 0x40100000;
298 
302  const unsigned long EVENT_CLIENT_DEFINED = 0x60000000;
303 
307  readonly attribute PRUint32 type;
308 
312  readonly attribute nsIVariant data;
313 
317  readonly attribute sbIDeviceEventTarget target;
318 
322  readonly attribute nsISupports origin;
323 
327  readonly attribute unsigned long deviceState;
328 
332  readonly attribute unsigned long deviceSubState;
333 };
const unsigned long COMMAND_DEVICE_MEDIA_FORMAT
const unsigned long COMMAND_CLIENT_DEFINED
const unsigned long EVENT_FIRMWARE_DOWNLOAD_ERROR
Firmware download error.
const unsigned long EVENT_DEVICE_TRANSCODE_END
const unsigned long EVENT_CLIENT_DEFINED
const unsigned long EVENT_DEVICE_ERROR_UNEXPECTED
const unsigned long EVENT_DEVICE_BEFORE_ADDED
const unsigned long EVENT_FIRMWARE_DOWNLOAD_END
Firmware download end.
const unsigned long EVENT_CONTROLLER_BASE
const unsigned long EVENT_DEVICE_MEDIA_READ_FAILED
const unsigned long EVENT_DEVICE_TRANSCODE_START
const unsigned long EVENT_DEVICE_DOWNLOAD_START
const unsigned long EVENT_DEVICE_SYNC_SETTINGS_RESET
const unsigned long EVENT_FIRMWARE_NEEDREC_ERROR
Firmware update requires recovery mode to be put on the device.
const unsigned long EVENT_DEVICE_MOUNTING_END
const unsigned long EVENT_DEVICE_LIBRARY_ADDED
const unsigned long EVENT_DEVICE_TRANSCODE_PROGRESS
const unsigned long COMMAND_DEVICE_MEDIA_EJECT
const unsigned long EVENT_DEVICE_MOUNTING_PROGRESS
const unsigned long EVENT_DEVICE_DOWNLOAD_END
const unsigned long EVENT_DEVICE_NOT_AVAILABLE
const unsigned long EVENT_FIRMWARE_BASE
Base Firmware Event Value, this event is never sent.
const unsigned long EVENT_DEVICE_SCAN_END
const unsigned long EVENT_FIRMWARE_WRITE_END
Firmware write to device start.
const unsigned long EVENT_DEVICE_FORMATTING_PROGRESS
const unsigned long EVENT_FIRMWARE_CFU_END
Check for update end.
const unsigned long EVENT_DEVICE_MEDIA_READ_START
const unsigned long EVENT_DEVICE_RESET
const unsigned long EVENT_DEVICE_DOWNLOAD_PROGRESS
const unsigned long COMMAND_CONTROLLER_RESET
const unsigned long EVENT_DEVICE_ADDED
var uuid
readonly attribute sbIDeviceEventTarget target
const unsigned long EVENT_DEVICE_FILE_MISSING
readonly attribute unsigned long deviceState
const unsigned long EVENT_FIRMWARE_UPDATE_END
Firmware update end.
const unsigned long COMMAND_DEVICE_POWER_UP
const unsigned long EVENT_DEVICE_FORMATTING_END
const unsigned long EVENT_FIRMWARE_WRITE_START
Firmware write to device start.
const unsigned long EVENT_FIRMWARE_VERIFY_END
Firmware verify device end.
const unsigned long EVENT_DEVICE_READY
const unsigned long EVENT_DEVICE_NOT_ENOUGH_FREESPACE
readonly attribute PRUint32 type
const unsigned long EVENT_DEVICE_TRANSFER_END
const unsigned long EVENT_FIRMWARE_CFU_START
Check for update start.
const unsigned long COMMAND_MARSHALL_BASE
const unsigned long COMMAND_MANAGER_REFRESH
const unsigned long EVENT_FIRMWARE_CFU_ERROR
Check for update error.
const unsigned long EVENT_DEVICE_TRANSCODE_ERROR
const unsigned long EVENT_FIRMWARE_VERIFY_START
Firmware verify device start.
const unsigned long EVENT_DEVICE_SCAN_START
const unsigned long EVENT_FIRMWARE_WRITE_PROGRESS
Firmware write to device start.
const unsigned long EVENT_DEVICE_MEDIA_WRITE_FAILED
const unsigned long EVENT_DEVICE_MOUNTING_START
const unsigned long EVENT_DEVICE_LIBRARY_REMOVED
const unsigned long EVENT_FIRMWARE_UPDATE_ERROR
Firmware update error.
const unsigned long EVENT_DEVICE_INFO_CHANGED
const unsigned long EVENT_DEVICE_FORMATTING_START
const unsigned long EVENT_DEVICE_MEDIA_READ_END
const unsigned long EVENT_FIRMWARE_VERIFY_PROGRESS
Firmware verify device progress.
const unsigned long EVENT_DEVICE_STATE_CHANGED
const unsigned long EVENT_DEVICE_BASE
const unsigned long COMMAND_DEVICE_POWER_DOWN
const unsigned long EVENT_DEVICE_MEDIA_WRITE_UNSUPPORTED_TYPE
const unsigned long EVENT_DEVICE_REMOVED
const unsigned long EVENT_DEVICE_TRANSFER_START
readonly attribute unsigned long deviceSubState
const unsigned long EVENT_DEVICE_DOWNLOAD_ERROR
const unsigned long EVENT_DEVICE_SYNC_TEMP_MODIFIED
const unsigned long EVENT_FIRMWARE_DOWNLOAD_PROGRESS
Firmware download progress.
const unsigned long EVENT_FIRMWARE_ERROR_BASE
Base value for firmware errors, this event is never sent.
const unsigned long EVENT_DEVICE_MEDIA_INSERTED
const unsigned long EVENT_DEVICE_MEDIA_REMOVED
const unsigned long EVENT_DEVICE_PREFS_CHANGED
const unsigned long EVENT_MANAGER_BASE
const unsigned long EVENT_DEVICE_MEDIA_WRITE_END
const unsigned long EVENT_DEVICE_DEFAULT_LIBRARY_CHANGED
const unsigned long COMMAND_CONTROLLER_BASE
const unsigned long EVENT_DEVICE_TRANSFER_PROGRESS
const unsigned long EVENT_DEVICE_MEDIA_READ_UNSUPPORTED_TYPE
const unsigned long COMMAND_DEVICE_BASE
const unsigned long EVENT_FIRMWARE_ERROR_UNKNOWN
Generic error.
const unsigned long EVENT_DEVICE_MEDIA_WRITE_START
const unsigned long COMMAND_MANAGER_BASE
readonly attribute nsISupports origin
const unsigned long EVENT_DEVICE_SYNC_SETTINGS_CHANGED
const unsigned long COMMAND_MARSHALL_RESET
readonly attribute nsIVariant data
const unsigned long EVENT_DEVICE_ACCESS_DENIED
const unsigned long EVENT_FIRMWARE_UPDATE_START
Firmware update start.
const unsigned long COMMAND_DEVICE_RESET
const unsigned long EVENT_FIRMWARE_WRITE_ERROR
Firmware write error.
const unsigned long EVENT_MARSHALL_BASE
const unsigned long EVENT_FIRMWARE_DOWNLOAD_START
Firmware download start.