Fix bug:TIVI-374[2.0] no hidd binary, which blocks bluetooth keyboard connection
[profile/ivi/bluez.git] / doc / media-api.txt
1 BlueZ D-Bus Media API description
2 *********************************
3
4 Media hierarchy
5 ===============
6
7 Service         org.bluez
8 Interface       org.bluez.Media
9 Object path     [variable prefix]/{hci0,hci1,...}
10
11 Methods         void RegisterEndpoint(object endpoint, dict properties)
12
13                         Register a local end point to sender, the sender can
14                         register as many end points as it likes.
15
16                         Note: If the sender disconnects the end points are
17                         automatically unregistered.
18
19                         possible properties:
20
21                                 string UUID:
22
23                                         UUID of the profile which the endpoint
24                                         is for.
25
26                                 byte Codec:
27
28                                         Assigned number of codec that the
29                                         endpoint implements. The values should
30                                         match the profile specification which
31                                         is indicated by the UUID.
32
33                                 array{byte} Capabilities:
34
35                                         Capabilities blob, it is used as it is
36                                         so the size and byte order must match.
37
38                         Possible Errors: org.bluez.Error.InvalidArguments
39                                          org.bluez.Error.NotSupported - emitted
40                                          when interface for the end-point is
41                                          disabled.
42
43                 void UnregisterEndpoint(object endpoint)
44
45                         Unregister sender end point.
46
47                 void RegisterPlayer(object player, dict properties,
48                                                                 dict metadata)
49
50                         Register a media player object to sender, the sender
51                         can register as many objets as it likes.
52
53                         Note: If the sender disconnects its objects are
54                         automatically unregistered.
55
56                         Properties:
57
58                                 string Equalizer:
59
60                                         Possible values: "off" or "on"
61
62                                 string Repeat:
63
64                                         Possible values: "off", "singletrack",
65                                                         "alltracks" or "group"
66
67                                 string Shuffle:
68
69                                         Possible values: "off", "alltracks" or
70                                                         "group"
71
72                                 string Scan:
73
74                                         Possible values: "off", "alltracks" or
75                                                         "group"
76
77                                 string Status:
78
79                                         Possible values: "playing", "stopped",
80                                                         "paused",
81                                                         "forward-seek",
82                                                         "reverse-seek" or
83                                                         "error"
84
85                                 uint32 Position
86
87                                         Playback position in milliseconds
88
89                         Metadata:
90
91                                 string Title:
92
93                                         Track title name
94
95                                 string Artist:
96
97                                         Track artist name
98
99                                 string Album:
100
101                                         Track album name
102
103                                 string Genre:
104
105                                         Track genre name
106
107                                 uint32 NumberOfTracks:
108
109                                         Number of tracks in total
110
111                                 uint32 Number:
112
113                                         Track number
114
115                                 uint32 Duration:
116
117                                         Track duration in milliseconds
118
119                         Possible Errors: org.bluez.Error.InvalidArguments
120                                          org.bluez.Error.NotSupported
121
122                 void UnregisterPlayer(object player)
123
124                         Unregister sender media player.
125
126 MediaPlayer hierarchy
127 =====================
128
129 Service         unique name
130 Interface       org.bluez.MediaPlayer
131 Object path     freely definable
132
133 Methods         void SetProperty(string property, variant value)
134
135                         Changes the value of the specified property. Only
136                         properties that are listed as read-write can be changed.
137
138                         On success this will emit a PropertyChanged signal.
139
140                 void Release()
141
142                         This method gets called when the service daemon
143                         unregisters the player which can then perform
144                         cleanup tasks. There is no need to unregister the
145                         player, because when this method gets called it has
146                         already been unregistered.
147
148 Signals         PropertyChanged(string setting, variant value)
149
150                         This signal indicates a changed value of the given
151                         property.
152
153                 TrackChanged(dict metadata)
154
155                         This signal indicates that current track has changed.
156                         All available metadata for the new track shall be set
157                         at once in the metadata argument. Metadata cannot be
158                         updated in parts, otherwise it will be interpreted as
159                         multiple track changes.
160
161                         Possible values:
162
163                                 string Title:
164
165                                         Track title name
166
167                                 string Artist:
168
169                                         Track artist name
170
171                                 string Album:
172
173                                         Track album name
174
175                                 string Genre:
176
177                                         Track genre name
178
179                                 uint32 NumberOfTracks:
180
181                                         Number of tracks in total
182
183                                 uint32 Number:
184
185                                         Track number
186
187                                 uint32 Duration:
188
189                                         Track duration in milliseconds
190
191 Properties      string Equalizer [readwrite]
192
193                         Possible values: "off" or "on"
194
195                 string Repeat [readwrite]
196
197                         Possible values: "off", "singletrack", "alltracks" or
198                                         "group"
199
200                 string Shuffle [readwrite]
201
202                         Possible values: "off", "alltracks" or "group"
203
204                 string Scan [readwrite]
205
206                         Possible values: "off", "alltracks" or "group"
207
208                 string Status [readonly]
209
210                         Possible status: "playing", "stopped", "paused",
211                                         "forward-seek", "reverse-seek" or
212                                         "error"
213
214                 uint32 Position [readonly]
215
216                         Playback position in milliseconds. Changing the
217                         position may generate additional events that will be
218                         sent to the remote device. When position is 0 it means
219                         the track is starting and when it's greater than or
220                         equal to track's duration the track has ended. Note
221                         that even if duration is not available in metadata it's
222                         possible to signal its end by setting position to the
223                         maximum uint32 value.
224
225 MediaEndpoint hierarchy
226 =======================
227
228 Service         unique name
229 Interface       org.bluez.MediaEndpoint
230 Object path     freely definable
231
232 Methods         void SetConfiguration(object transport, dict properties)
233
234                         Set configuration for the transport.
235
236                 array{byte} SelectConfiguration(array{byte} capabilities)
237
238                         Select preferable configuration from the supported
239                         capabilities.
240
241                         Returns a configuration which can be used to setup
242                         a transport.
243
244                         Note: There is no need to cache the selected
245                         configuration since on success the configuration is
246                         send back as parameter of SetConfiguration.
247
248                 void ClearConfiguration(object transport)
249
250                         Clear transport configuration.
251
252                 void Release()
253
254                         This method gets called when the service daemon
255                         unregisters the endpoint. An endpoint can use it to do
256                         cleanup tasks. There is no need to unregister the
257                         endpoint, because when this method gets called it has
258                         already been unregistered.
259
260 MediaTransport hierarchy
261 ========================
262
263 Service         org.bluez
264 Interface       org.bluez.MediaTransport
265 Object path     [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/fdX
266
267 Methods         dict GetProperties()
268
269                         Returns all properties for the interface. See the
270                         properties section for available properties.
271
272                 fd, uint16, uint16 Acquire(string accesstype)
273
274                         Acquire transport file descriptor and the MTU for read
275                         and write respectively.
276
277                         possible accesstype:
278
279                                 "r" : Read only access
280
281                                 "w" : Write only access
282
283                                 "rw": Read and write access
284
285                 void Release(string accesstype)
286
287                         Releases file descriptor.
288
289                 void SetProperty(string name, variant value)
290
291                         Changes the value of the specified property. Only
292                         properties that are listed a read-write can be changed.
293
294                         On success this will emit a PropertyChanged signal.
295
296 Signals         void PropertyChanged(string name, variant value)
297
298                         This signal indicates a changed value of the given
299                         property.
300
301 Properties      object Device [readonly]
302
303                         Device object which the transport is connected to.
304
305                 string UUID [readonly]
306
307                         UUID of the profile which the transport is for.
308
309                 byte Codec [readonly]
310
311                         Assigned number of codec that the transport support.
312                         The values should match the profile specification which
313                         is indicated by the UUID.
314
315                 array{byte} Configuration [readonly]
316
317                         Configuration blob, it is used as it is so the size and
318                         byte order must match.
319
320                 uint16 Delay [readwrite]
321
322                         Optional. Transport delay in 1/10 of millisecond, this
323                         property is only writeable when the transport was
324                         acquired by the sender.
325
326                 boolean NREC [readwrite]
327
328                         Optional. Indicates if echo cancelling and noise
329                         reduction functions are active in the transport, this
330                         property is only writeable when the transport was
331                         acquired by the sender.
332
333                 boolean InbandRingtone [readwrite]
334
335                         Optional. Indicates if the transport support sending
336                         ringtones, this property is only writeable when the
337                         transport was acquired by the sender.
338
339                 string Routing [readonly]
340
341                         Optional. Indicates where is the transport being routed
342
343                         Possible Values: "HCI" or "PCM"
344
345                 uint16 Volume [readwrite]
346
347                         Optional. Indicates volume level of the transport,
348                         this property is only writeable when the transport was
349                         acquired by the sender.
350
351                         Possible Values: 0-127