C:/projects/songbird/components/playlistplayback/public/sbIPlaylistPlayback.idl

00001 
00036 #include "nsISupports.idl"
00037 #include "nsIObserver.idl"
00038 
00039 interface sbIPlaylist;
00040 interface sbICoreWrapper;
00041 
00054 [scriptable, uuid(190b1e87-8769-43b4-a362-4065eb6730e5)]
00055 interface sbIPlaylistPlayback : nsIObserver
00056 {
00057   // --------------------------------------------------------------------------
00058   // Constants for repeat state - this must match the implementation's
00059   // --------------------------------------------------------------------------
00060 
00063   const short REPEAT_MODE_OFF = 0;
00064 
00067   const short REPEAT_MODE_ONE = 1;
00068 
00071   const short REPEAT_MODE_ALL = 2;
00072 
00073 
00074   // --------------------------------------------------------------------------
00075   // Attributes reflecting state of the playback core:
00076   // --------------------------------------------------------------------------
00077 
00085   attribute sbICoreWrapper core;
00086 
00091   attribute short volume;
00092 
00097   attribute boolean mute;
00098 
00104   attribute PRInt64 position;
00105 
00110   readonly attribute PRInt64 length;
00111 
00117   readonly attribute boolean paused;
00118 
00125   readonly attribute boolean playing;
00126 
00127 
00128   // --------------------------------------------------------------------------
00129   // Attributes reflecting Songbird playback state:
00130   // --------------------------------------------------------------------------
00131 
00139   attribute short repeat;
00140 
00144   attribute boolean shuffle;
00145 
00150   readonly attribute PRInt32 itemCount;
00151 
00155   readonly attribute AString currentGUID;
00156 
00160   readonly attribute AString currentURL;
00161 
00168   readonly attribute boolean started;
00169 
00170 
00171   // --------------------------------------------------------------------------
00172   // Methods for Mutli-core manipulation
00173   // --------------------------------------------------------------------------
00174 
00186   void addCore(in sbICoreWrapper aCore, in boolean aSelect);
00187 
00194   void removeCore(in sbICoreWrapper aCore);
00195 
00204   void selectCore(in sbICoreWrapper aCore);
00205 
00206 
00207   // --------------------------------------------------------------------------
00208   // "Standard" player controls
00209   // --------------------------------------------------------------------------
00210 
00220   boolean play();
00221 
00229   boolean pause();
00230 
00239   boolean stop();
00240 
00247   PRInt32 next();
00248 
00255   PRInt32 previous();
00256 
00263   PRInt32 current();
00264 
00272   void goFullscreen();
00273 
00274 
00275   // --------------------------------------------------------------------------
00276   // Various ways of passing in content to play
00277   // --------------------------------------------------------------------------
00278 
00290   boolean playRef(in AString aSourceRef, in PRInt32 aIndex);
00291 
00303   boolean playRefByID(in AString aSourceRef, in PRInt32 aRowID);
00304 
00315   boolean playRefByUUID(in AString aSourceRef, in AString aMediaUUID);
00316 
00327   boolean playRefByURL(in AString aSourceRef, in AString aURL);
00328 
00341   boolean playTable(in AString aDatabaseID, in AString aTable, in PRInt32 aIndex);
00342 
00355   boolean playTableByURL(in AString aDatabaseID, in AString aTable, in AString aURL);
00356 
00369   boolean playTableByID(in AString aDatabaseID, in AString aTable, in PRInt32 aRowID);
00370 
00383   boolean playTableByUUID(in AString aDatabaseID, in AString aTable, in AString aMediaUUID);
00384 
00395   boolean playObject(in sbIPlaylist aPlaylist, in PRInt32 aIndex);
00396 
00405   boolean playURL(in AString aURL);
00406 
00414   boolean playAndImportURL(in AString aURL);
00415 
00422   PRInt32 importURL(in AString aURL);
00423 
00424 
00425   // --------------------------------------------------------------------------
00426   // Metadata methods
00427   // --------------------------------------------------------------------------
00428  
00439   void getMetadataFields(out PRUint32 aFieldCount,
00440                          [array, size_is(aFieldCount), retval] out wstring aMetaFields);
00441  
00449   AString getCurrentValue(in AString aField);
00450  
00459   void setCurrentValue(in AString aField, in AString aValue);
00460  
00471   void getCurrentValues(in PRUint32 aFieldCount,
00472                         [array, size_is(aFieldCount)] in wstring aMetaFields,
00473                         out PRUint32 aValueCount,
00474                         [array, size_is(aValueCount), retval] out wstring aMetaValues);
00475  
00487   void setCurrentValues(in PRUint32 aFieldCount,
00488                         [array, size_is(aFieldCount)] in wstring aMetaFields, 
00489                         in PRUint32 aValueCount,
00490                         [array, size_is(aValueCount)] in wstring aMetaValues);
00491 
00492 
00493   // --------------------------------------------------------------------------
00494   // URL checking
00495   // --------------------------------------------------------------------------
00496  
00506   boolean isMediaURL(in AString aURL);
00507  
00517   boolean isVideoURL(in AString aURL);
00518  
00528   boolean isPlaylistURL(in AString aURL);
00529 
00530  
00531   // --------------------------------------------------------------------------
00532   // String twiddling
00533   // --------------------------------------------------------------------------
00534  
00541   AString stripHoursFromTimeString(in AString aTimeString);
00542  
00550   AString emitSecondsToTimeString(in AString aSeconds);
00551  
00559   AString convertURLToDisplayName(in AString aURL);
00560  
00568   AString convertURLToFolder(in AString aURL);
00569 
00570 };
00571 

Generated on Mon Aug 21 21:01:55 2006 for Songbird by  doxygen 1.4.7