Songbird / Development / Songbird Add-Ons API Documentation

components/devices/base/public/sbIDevice.idl

Go to the documentation of this file.
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 
00031 #include "nsISupports.idl"
00032 
00033 interface nsIPropertyBag2;
00034 interface nsIVariant;
00035 
00036 interface sbIDeviceCapabilities;
00037 interface sbIDeviceContent;
00038 interface sbIDeviceProperties;
00039 interface sbIDeviceParameters;
00040 interface sbIDeviceStatus;
00041 
00048 [scriptable, uuid(5e65f09a-b47c-41f7-bb4e-0174a3a956eb)]
00049 interface sbIDevice : nsISupports
00050 {
00054   readonly attribute AString name;
00055 
00059   readonly attribute nsIDPtr controllerId;
00060   
00064   readonly attribute nsIDPtr id;
00065 
00069   void connect();
00070 
00076   void disconnect();
00077 
00081   readonly attribute boolean connected;
00082 
00087   readonly attribute boolean threaded;
00088 
00092   nsIVariant getPreference(in AString aPrefName);
00093 
00097   void setPreference(in AString aPrefName,
00098                      in nsIVariant aPrefValue);
00099 
00103   readonly attribute sbIDeviceCapabilities capabilities;
00104 
00108   readonly attribute sbIDeviceContent content;
00109 
00113   readonly attribute nsIPropertyBag2 parameters;
00114   
00118   readonly attribute sbIDeviceProperties properties;
00119   
00125   readonly attribute boolean isBusy;
00126   
00134   readonly attribute boolean canDisconnect;
00135   
00142   readonly attribute sbIDeviceStatus currentStatus;
00143   
00150   readonly attribute unsigned long state;
00151 
00152   const unsigned long STATE_IDLE            = 0;  // Not doing anything
00153   const unsigned long STATE_SYNCING         = 1;  // Performing a sync
00154   // These are not related to syncing (used for manual mode)
00155   const unsigned long STATE_COPYING         = 2;  // Copying a single file
00156   const unsigned long STATE_DELETING        = 3;  // Deleting a single file
00157   const unsigned long STATE_UPDATING        = 4;  // Updating a single file
00158   const unsigned long STATE_MOUNTING        = 5;  // (un)Mounting the device
00159   const unsigned long STATE_DOWNLOADING     = 6;
00160   const unsigned long STATE_UPLOADING       = 7;
00161   const unsigned long STATE_DOWNLOAD_PAUSED = 8;
00162   const unsigned long STATE_UPLOAD_PAUSED   = 9;
00163   const unsigned long STATE_DISCONNECTED    = 10; // Device is disconnected
00164   const unsigned long STATE_BUSY            = 11; // Busy with unspecified
00165                                                   // operation
00166   const unsigned long STATE_CANCEL          = 12; // In process of canceling operation
00167   
00168   const unsigned long STATE_USER            = 0x20000000;
00169 
00170   const unsigned long REQUEST_FLAG_USER  = 0x80000000;
00171   const unsigned long REQUEST_FLAG_WRITE = 0x40000000;
00172 
00173   /* read requests */
00174   const unsigned long REQUEST_MOUNT     = 1;
00175   const unsigned long REQUEST_READ      = 2;
00176   const unsigned long REQUEST_EJECT     = 3;
00177   const unsigned long REQUEST_SUSPEND   = 4;
00178 
00179   /* write requests */
00180   const unsigned long REQUEST_WRITE         = REQUEST_FLAG_WRITE + 1;
00181   const unsigned long REQUEST_DELETE        = REQUEST_FLAG_WRITE + 2;
00182   const unsigned long REQUEST_SYNC          = REQUEST_FLAG_WRITE + 3;
00183   /* delete all files on the device */
00184   const unsigned long REQUEST_WIPE          = REQUEST_FLAG_WRITE + 4;
00185   /* move an item inside one playlist */
00186   const unsigned long REQUEST_MOVE          = REQUEST_FLAG_WRITE + 5;
00187   const unsigned long REQUEST_UPDATE        = REQUEST_FLAG_WRITE + 6;
00188   const unsigned long REQUEST_NEW_PLAYLIST  = REQUEST_FLAG_WRITE + 7;
00189 
00190   /* reset the device to its factory state */
00191   const unsigned long REQUEST_FACTORY_RESET = REQUEST_FLAG_WRITE + 8;
00192   
00196   void submitRequest(in unsigned long aRequest, in nsIPropertyBag2 aRequestParameters);
00200   void cancelRequests();
00201   
00205   void syncLibraries();
00206 
00210   void eject();
00211 
00212   /* Set the enabled state on a named warning dialog */
00213   void setWarningDialogEnabled(in AString aWarning, in boolean aEnabled);
00214   /* Get the enabled state on a named warning dialog */
00215   boolean getWarningDialogEnabled(in AString aWarning);
00216   /* Reset the enabled state of all warning dialogs */
00217   void resetWarningDialogs();
00218 };

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