Songbird / Development / Songbird Add-Ons API Documentation

components/devices/base/public/sbIDeviceEvent.idl

00001 /*
00002 //
00003 // BEGIN SONGBIRD GPL
00004 // 
00005 // This file is part of the Songbird web player.
00006 //
00007 // Copyright© 2005-2008 POTI, Inc.
00008 // http://songbirdnest.com
00009 // 
00010 // This file may be licensed under the terms of of the
00011 // GNU General Public License Version 2 (the "GPL").
00012 // 
00013 // Software distributed under the License is distributed 
00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
00015 // express or implied. See the GPL for the specific language 
00016 // governing rights and limitations.
00017 //
00018 // You should have received a copy of the GPL along with this 
00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html
00020 // or write to the Free Software Foundation, Inc., 
00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022 // 
00023 // END SONGBIRD GPL
00024 //
00025 */
00026 
00027 #include "nsISupports.idl"
00028 
00029 interface nsIVariant;
00030 
00031 interface sbIDeviceEventTarget;
00032 
00037 [scriptable, uuid(86a4e796-5e8d-452c-8551-8078527278f6)]
00038 interface sbIDeviceEvent : nsISupports
00039 {
00043   const unsigned long COMMAND_DEVICE_BASE         = 0x00000000;
00044   const unsigned long COMMAND_DEVICE_RESET        = COMMAND_DEVICE_BASE + 1;
00045   const unsigned long COMMAND_DEVICE_POWER_DOWN   = COMMAND_DEVICE_BASE + 2;
00046   const unsigned long COMMAND_DEVICE_POWER_UP     = COMMAND_DEVICE_BASE + 3;
00047   const unsigned long COMMAND_DEVICE_MEDIA_EJECT  = COMMAND_DEVICE_BASE + 4;
00048   const unsigned long COMMAND_DEVICE_MEDIA_FORMAT = COMMAND_DEVICE_BASE + 5;
00049 
00053   const unsigned long COMMAND_CONTROLLER_BASE  = 0x00020000;
00054   const unsigned long COMMAND_CONTROLLER_RESET = COMMAND_CONTROLLER_BASE + 1;
00055 
00059   const unsigned long COMMAND_MARSHALL_BASE  = 0x00040000;
00060   const unsigned long COMMAND_MARSHALL_RESET = COMMAND_MARSHALL_BASE + 1;
00061 
00065   const unsigned long COMMAND_MANAGER_BASE    = 0x00060000;
00066   const unsigned long COMMAND_MANAGER_REFRESH = COMMAND_MANAGER_BASE + 1;
00067 
00071   const unsigned long COMMAND_CLIENT_DEFINED = 0x20000000;
00072 
00076   const unsigned long EVENT_DEVICE_BASE               = 0x40000000;
00077   
00078   // the device was connected
00079   const unsigned long EVENT_DEVICE_ADDED              = EVENT_DEVICE_BASE + 1;
00080   // the device was disconnected
00081   const unsigned long EVENT_DEVICE_REMOVED            = EVENT_DEVICE_BASE + 2;
00082   // the device was reset
00083   const unsigned long EVENT_DEVICE_RESET              = EVENT_DEVICE_BASE + 3;
00084   
00085   // some sort of storage media was inserted into the device
00086   const unsigned long EVENT_DEVICE_MEDIA_INSERTED     = EVENT_DEVICE_BASE + 4;
00087   // some sort of storage media was removed from the device
00088   // (note that there may be more than one, and some may still be in the device)
00089   const unsigned long EVENT_DEVICE_MEDIA_REMOVED      = EVENT_DEVICE_BASE + 5;
00090 
00091   const unsigned long EVENT_DEVICE_TRANSFER_START     = EVENT_DEVICE_BASE + 6;
00092   const unsigned long EVENT_DEVICE_TRANSFER_PROGRESS  = EVENT_DEVICE_BASE + 7;
00093   const unsigned long EVENT_DEVICE_TRANSFER_END       = EVENT_DEVICE_BASE + 8;
00094 
00095   // device state changes
00096   const unsigned long EVENT_DEVICE_MOUNTING_START      = EVENT_DEVICE_BASE + 9;
00097   const unsigned long EVENT_DEVICE_MOUNTING_PROGRESS   = EVENT_DEVICE_BASE + 10;
00098   const unsigned long EVENT_DEVICE_MOUNTING_END        = EVENT_DEVICE_BASE + 11;
00099 
00100   const unsigned long EVENT_DEVICE_READY               = EVENT_DEVICE_BASE + 12;
00101 
00102   const unsigned long EVENT_DEVICE_MEDIA_READ_START   = EVENT_DEVICE_BASE + 13;
00103   const unsigned long EVENT_DEVICE_MEDIA_READ_END     = EVENT_DEVICE_BASE + 14;
00104   const unsigned long EVENT_DEVICE_MEDIA_READ_FAILED  = EVENT_DEVICE_BASE + 15;
00105   const unsigned long EVENT_DEVICE_MEDIA_WRITE_START  = EVENT_DEVICE_BASE + 16;
00106   const unsigned long EVENT_DEVICE_MEDIA_WRITE_END    = EVENT_DEVICE_BASE + 17;
00107   const unsigned long EVENT_DEVICE_MEDIA_WRITE_FAILED = EVENT_DEVICE_BASE + 18;
00108   
00109   const unsigned long EVENT_DEVICE_INFO_CHANGED       = EVENT_DEVICE_BASE + 19;
00110 
00111   // device transfer errors
00112   const unsigned long EVENT_DEVICE_MEDIA_READ_UNSUPPORTED_TYPE  = EVENT_DEVICE_BASE + 20;
00113   const unsigned long EVENT_DEVICE_MEDIA_WRITE_UNSUPPORTED_TYPE = EVENT_DEVICE_BASE + 21;
00114   
00115   // device general errors
00116   const unsigned long EVENT_DEVICE_ACCESS_DENIED        = EVENT_DEVICE_BASE + 22;
00117   const unsigned long EVENT_DEVICE_NOT_ENOUGH_FREESPACE = EVENT_DEVICE_BASE + 23;
00118   const unsigned long EVENT_DEVICE_NOT_AVAILABLE        = EVENT_DEVICE_BASE + 24;
00119 
00120   // device generic catch-all error
00121   const unsigned long EVENT_DEVICE_ERROR_UNEXPECTED     = EVENT_DEVICE_BASE + 25;
00122 
00123   // device generic state changed
00124   const unsigned long EVENT_DEVICE_STATE_CHANGED        = EVENT_DEVICE_BASE + 26;
00125 
00126   // device preferences changed
00127   const unsigned long EVENT_DEVICE_PREFS_CHANGED        = EVENT_DEVICE_BASE + 27;
00128 
00132   const unsigned long EVENT_CONTROLLER_BASE = 0x40020000;
00133 
00137   const unsigned long EVENT_MARSHALL_BASE = 0x40040000;
00138 
00142   const unsigned long EVENT_MANAGER_BASE = 0x40060000;
00143 
00147   const unsigned long EVENT_CLIENT_DEFINED = 0x60000000;
00148 
00152   readonly attribute PRUint32 type;
00153 
00157   readonly attribute nsIVariant data;
00158 
00162   readonly attribute sbIDeviceEventTarget target;
00163   
00167   readonly attribute nsISupports origin;
00168 };

Generated on Tue Mar 10 14:28:54 2009 for Songbird by  doxygen 1.5.2