sbICDDevice.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2009 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
27 #include "sbIDevice.idl"
28 #include "sbIDeviceEvent.idl"
29 #include "nsISupports.idl"
30 interface nsIArray;
31 
32 
33 //------------------------------------------------------------------------------
34 //
35 // @interface sbICDTOCEntry
36 // @brief This interface represents a track entry in the CD table of contents.
37 //
38 //------------------------------------------------------------------------------
39 
40 [scriptable, uuid(2e06760a-1dd2-11b2-bdee-fcb2b291e86e)]
42 {
43  //
44  // @brief Track mode type constants
45  //
46  const unsigned short TRACKMODE_AUDIO = 0;
47  const unsigned short TRACKMODE_DATA = 1;
48  const unsigned short TRACKMODE_OTHER = 3;
49 
50  readonly attribute long frameOffset;
51  readonly attribute PRTime length;
52  readonly attribute long trackNumber;
53  readonly attribute AString trackURI;
54  readonly attribute short trackMode;
55 };
56 
57 //------------------------------------------------------------------------------
58 //
59 // @interface sbICDTOC
60 // @brief This interface represents a CD table of contents.
61 //
62 //------------------------------------------------------------------------------
63 
64 [scriptable, uuid(3b3b290a-1dd2-11b2-aabc-9439b224f085)]
65 interface sbICDTOC : nsISupports
66 {
67  //
68  // @brief First track index (this value is used for CD database lookup)
69  //
70  readonly attribute long firstTrackIndex;
71 
72  //
73  // @brief Last track index (this value is used for CD database lookup)
74  //
75  readonly attribute long lastTrackIndex;
76 
77  //
78  // @brief Lead-out track offset (this value is used for CD database lookup)
79  //
80  readonly attribute long leadOutTrackOffset;
81 
82  //
83  // @brief tracks contains an array of sbICDTOCEntry values
84  //
85  readonly attribute nsIArray tracks;
86 };
87 
88 //------------------------------------------------------------------------------
89 //
90 // @interface sbICDDeviceEvent
91 // @brief Base CD device event interface.
92 //
93 //------------------------------------------------------------------------------
94 [scriptable, uuid(052861b6-1dd2-11b2-b2bc-d05cabd40402)]
96 {
97  //
98  // @brief CD metadata lookup query started event.
99  //
101 
102  //
103  // @brief CD metadata lookup query completed event.
104  //
106 
107  //
108  // @brief CD metadata has been applied to the device's items.
109  //
111 
112  //
113  // @brief CD rip has completed.
114  //
115  const unsigned long EVENT_CDRIP_COMPLETED = EVENT_CLIENT_DEFINED + 4;
116 
117  //
118  // @brief Request constants
119  //
121 
122  //
123  // @brief State constants
124  //
125  const unsigned long STATE_LOOKINGUPCD = sbIDevice::STATE_USER + 1;
126 };
127 
128 //------------------------------------------------------------------------------
129 //
130 // @interface sbICDDevice
131 // @brief This interface represents one CD device.
132 //
133 //------------------------------------------------------------------------------
134 
135 [scriptable, uuid(9D51DC46-3038-430A-94C5-C98C0C3301E2)]
137 {
138  //
139  // @brief Disc type contants
140  //
141  const unsigned long AUDIO_DISC_TYPE = 0;
142  const unsigned long DATA_DISC_TYPE = 1;
143 
144  //
145  // @brief name of the device (usually contains manufacturer's name)
146  //
147  readonly attribute AString name;
148 
149  //
150  // @brief can we read (rip) data off this device?
151  //
152  readonly attribute boolean readable;
153 
154  //
155  // @brief can we write (burn) data to this device?
156  //
157  readonly attribute boolean writeable;
158 
159  //
160  // @brief returns true if a CD is currently in the drive
161  //
162  readonly attribute boolean isDiscInserted;
163 
164  //
165  // @brief Unique identifier for this CD device.
166  // @note String varies on implementor.
167  //
168  readonly attribute ACString identifier;
169 
170  //
171  // @brief returns the table of contents of the current CD in the drive
172  //
173  readonly attribute sbICDTOC discTOC;
174 
175  //
176  // @brief returns the disc type of the CD in the drive ("audio" or "data")
177  //
178  readonly attribute unsigned long discType;
179 
180  //
181  // @brief ejects the CD from the drive
182  //
183  void eject();
184 
185  //
186  // @brief Return the locked state of the device.
187  //
188  readonly attribute boolean isDeviceLocked;
189 
190  //
191  // @brief Lock the CD drive (prevent the tray from being opened)
192  //
193  void lockDevice();
194 
195  //
196  // @brief Unlock the CD drive (allow the tray from being opened)
197  //
198  void unlockDevice();
199 };
const unsigned long EVENT_CDLOOKUP_METADATA_COMPLETE
function A
readonly attribute boolean readable
const unsigned long EVENT_CLIENT_DEFINED
const unsigned long REQUEST_CDLOOKUP
readonly attribute long frameOffset
Definition: sbICDDevice.idl:50
const unsigned long EVENT_CDLOOKUP_COMPLETED
void unlockDevice()
readonly attribute long lastTrackIndex
Definition: sbICDDevice.idl:75
readonly attribute long leadOutTrackOffset
Definition: sbICDDevice.idl:80
readonly attribute ACString identifier
void lockDevice()
const unsigned long EVENT_CDRIP_COMPLETED
var uuid
const unsigned long REQUEST_FLAG_USER
Definition: sbIDevice.idl:252
Definition: sbICDDevice.idl:41
const unsigned long STATE_USER
Definition: sbIDevice.idl:246
readonly attribute unsigned long discType
readonly attribute PRTime length
Definition: sbICDDevice.idl:51
readonly attribute AString trackURI
Definition: sbICDDevice.idl:53
readonly attribute boolean isDiscInserted
const unsigned long STATE_LOOKINGUPCD
const unsigned short TRACKMODE_AUDIO
Definition: sbICDDevice.idl:46
const unsigned long DATA_DISC_TYPE
void eject()
readonly attribute short trackMode
Definition: sbICDDevice.idl:54
const unsigned long EVENT_CDLOOKUP_INITIATED
const unsigned long AUDIO_DISC_TYPE
readonly attribute sbICDTOC discTOC
readonly attribute AString name
readonly attribute nsIArray tracks
Definition: sbICDDevice.idl:85
readonly attribute boolean writeable
readonly attribute long firstTrackIndex
Definition: sbICDDevice.idl:70
readonly attribute boolean isDeviceLocked
const unsigned short TRACKMODE_OTHER
Definition: sbICDDevice.idl:48
readonly attribute long trackNumber
Definition: sbICDDevice.idl:52
const unsigned short TRACKMODE_DATA
Definition: sbICDDevice.idl:47