~ubuntu-branches/ubuntu/trusty/xmms2/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/tutorial/vala/xmms2-client.vapi

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2011-10-22 23:53:00 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20111022235300-xnuousf7u2622uph
Tags: 0.8+dfsg-1
* New upstream release.
  - Drop code name DrO_o from Debian version, because an underscore is not
    allowed in a Debian version.
  - Order items alphabetically in xmms2 manual page (Closes: #620665).
* Drop backported patches and patches that are applied upstream.
* Refresh remaining four patches.
* Drop xmms2-client-vis, because its content is not meant for anything other
  than development reference.
* Drop xmms2-et package, because it used only in the test phase.
* Add new xmms2-plugin-sndfile package.
  - Add libsndfile1-dev as build dependency for it.
* libxmmsclient6.symbols: Add new and remove five symbols that were only
  internal symbols.
* Update watch file.
* Replace Florian Ragwitz as maintainer. Thanks for your work.
* Remove all inactive uploaders. Thanks to them for their previous work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[CCode(cheader_filename = "xmmsclient/xmmsclient.h", cprefix="xmms")]
 
2
namespace Xmms {
 
3
        [CCode(cprefix="XMMS_COLLECTION_CHANGED_")]
 
4
        public enum CollectionChanged {
 
5
                ADD,
 
6
                UPDATE,
 
7
                RENAME,
 
8
                REMOVE,
 
9
        }
 
10
 
 
11
        [CCode(cprefix="XMMS_MEDIAINFO_READER_STATUS_")]
 
12
        public enum ReaderStatus {
 
13
                IDLE,
 
14
                RUNNING,
 
15
        }
 
16
 
 
17
        [CCode(cprefix="XMMS_PLAYBACK_STATUS_")]
 
18
        public enum PlaybackStatus {
 
19
                STOP,
 
20
                PLAY,
 
21
                PAUSE,
 
22
        }
 
23
 
 
24
        [CCode(cprefix="XMMS_PLAYLIST_CHANGED_")]
 
25
        public enum PlaylistChange {
 
26
                ADD,
 
27
                INSERT,
 
28
                SHUFFLE,
 
29
                REMOVE,
 
30
                CLEAR,
 
31
                MOVE,
 
32
                SORT,
 
33
                UPDATE,
 
34
        }
 
35
 
 
36
 
 
37
        [CCode(cprefix="XMMS_PLUGIN_TYPE_")]
 
38
        public enum PluginType {
 
39
                ALL,
 
40
                OUTPUT,
 
41
                XFORM,
 
42
        }
 
43
 
 
44
        [CCode(cprefix="XMMS_COLLECTION_TOKEN_")]
 
45
        public enum CollectionTokenType {
 
46
                INVALID,
 
47
                GROUP_OPEN,
 
48
                GROUP_CLOSE,
 
49
                REFERENCE,
 
50
                SYMBOL_ID,
 
51
                STRING,
 
52
                PATTERN,
 
53
                INTEGER,
 
54
                SEQUENCE,
 
55
                PROP_LONG,
 
56
                PROP_SHORT,
 
57
                OPSET_UNION,
 
58
                OPSET_INTERSECTION,
 
59
                OPSET_COMPLEMENT,
 
60
                OPFIL_HAS,
 
61
                OPFIL_EQUALS,
 
62
                OPFIL_MATCH,
 
63
                OPFIL_SMALLER,
 
64
                OPFIL_GREATER,
 
65
                OPFIL_SMALLEREQ,
 
66
                OPFIL_GREATEREQ,
 
67
        }
 
68
 
 
69
#if XMMS_API_COLLECTIONS_TWO_DOT_ZERO
 
70
        [CCode(cprefix="XMMS_COLLECTION_TYPE_")]
 
71
        public enum CollectionType {
 
72
                REFERENCE,
 
73
                UNIVERSE,
 
74
                UNION,
 
75
                INTERSECTION,
 
76
                COMPLEMENT,
 
77
                HAS,
 
78
                EQUALS,
 
79
                MATCH,
 
80
                SMALLER,
 
81
                GREATER,
 
82
                ORDER,
 
83
                LIMIT,
 
84
                MEDIASET,
 
85
                IDLIST
 
86
        }
 
87
#else
 
88
        public enum CollectionType {
 
89
                REFERENCE,
 
90
                UNION,
 
91
                INTERSECTION,
 
92
                COMPLEMENT,
 
93
                HAS,
 
94
                EQUALS,
 
95
                MATCH,
 
96
                SMALLER,
 
97
                GREATER,
 
98
                IDLIST,
 
99
                QUEUE,
 
100
                PARTYSHUFFLE,
 
101
        }
 
102
#endif
 
103
 
 
104
        [CCode(cprefix="XMMS_MEDIALIB_ENTRY_STATUS_")]
 
105
        public enum EntryStatus {
 
106
                NEW,
 
107
                OK,
 
108
                RESOLVING,
 
109
                NOT_AVAILABLE,
 
110
                REHASH,
 
111
        }
 
112
 
 
113
        [CCode(cprefix="XMMSC_RESULT_CLASS_")]
 
114
        public enum ResultType {
 
115
                DEFAULT,
 
116
                SIGNAL,
 
117
                BROADCAST,
 
118
        }
 
119
 
 
120
        [CCode(cprefix="XMMSV_TYPE_", cname="xmmsv_type_t")]
 
121
        public enum ValueType {
 
122
                NONE = 0,
 
123
                ERROR,
 
124
                INT32,
 
125
                STRING,
 
126
                COLL,
 
127
                BIN,
 
128
                LIST,
 
129
                DICT,
 
130
                END,
 
131
        }
 
132
 
 
133
        [CCode(cprefix="XMMS_PLAYBACK_SEEK_", cname="xmms_playback_seek_mode_t")]
 
134
        public enum PlaybackSeekMode {
 
135
                CUR,
 
136
                SET
 
137
        }
 
138
 
 
139
        [CCode(cname="xmmsc_disconnect_func_t")]
 
140
        public delegate void DisconnectFunc ();
 
141
 
 
142
        [CCode(cname="xmmsv_list_foreach_func")]
 
143
        public delegate void ListForeachFunc (Xmms.Value val);
 
144
 
 
145
        [CCode(cname="xmmsv_dict_foreach_func")]
 
146
        public delegate void DictForeachFunc (string key, Xmms.Value val);
 
147
 
 
148
        [CCode(cname="xmmsc_result_notifier_t")]
 
149
        public delegate bool NotifierFunc (Xmms.Value val);
 
150
 
 
151
        [CCode(cname="xmmsc_user_data_free_func_t")]
 
152
        public delegate void UserDataFreeFunc (void *obj);
 
153
 
 
154
        [CCode(cname="xmmsc_coll_parse_tokens_f")]
 
155
        public delegate CollectionToken CollectionParseTokensFunc (string key, string[] npos);
 
156
 
 
157
        [CCode(cname="xmmsc_coll_parse_build_f")]
 
158
        public delegate Collection CollectionParseBuildFunc (CollectionToken[] t);
 
159
 
 
160
        [CCode(cname="xmmsc_coll_attribute_foreach_func")]
 
161
        public delegate void CollectionAttributeForeachFunc (string key, string val);
 
162
 
 
163
        public const string ACTIVE_PLAYLIST;
 
164
        public const string COLLECTION_NS_ALL;
 
165
        public const string COLLECTION_NS_COLLECTIONS;
 
166
        public const string COLLECTION_NS_PLAYLISTS;
 
167
 
 
168
        public const size_t PATH_MAX;
 
169
        public const uint16 DEFAULT_TCP_PORT;
 
170
 
 
171
        public static unowned string? userconfdir_get (char[] buffer=new char[PATH_MAX]);
 
172
        public static unowned string? usercachedir_get (char[] buffer=new char[PATH_MAX]);
 
173
        public static unowned string? default_ipcpath_get (char[] buffer=new char[PATH_MAX]);
 
174
        public static unowned string? fallback_ipcpath_get (char[] buffer=new char[PATH_MAX]);
 
175
 
 
176
        [Compact]
 
177
        [CCode (cname="xmmsc_coll_token_t")]
 
178
        public class CollectionToken {
 
179
                        public Xmms.CollectionTokenType type;
 
180
                        [CCode(cname="string")]
 
181
                        public string str;
 
182
                        public unowned CollectionToken next;
 
183
        }
 
184
 
 
185
        [Compact]
 
186
        [CCode (cname="xmmsc_connection_t",     cprefix="xmmsc_", ref_function="xmmsc_ref", unref_function="xmmsc_unref")]
 
187
        public class Client
 
188
        {
 
189
                [CCode (cname="xmmsc_init")]
 
190
                public Client(string name);
 
191
                public bool connect (string? path=null);
 
192
 
 
193
                /*
 
194
                 * Playback functions
 
195
                 */
 
196
                public Result playback_stop();
 
197
                public Result playback_tickle();
 
198
                public Result playback_start();
 
199
                public Result playback_pause();
 
200
                public Result playback_current_id();
 
201
                public Result playback_seek_ms(uint milliseconds, PlaybackSeekMode whence);
 
202
                public Result playback_seek_samples(uint samples, PlaybackSeekMode whence);
 
203
                public Result playback_playtime();
 
204
                public Result playback_status();
 
205
                public Result playback_volume_set(string channel, uint volume);
 
206
                public Result playback_volume_get();
 
207
                public Result broadcast_playback_volume_changed();
 
208
                public Result broadcast_playback_status();
 
209
                public Result broadcast_playback_current_id();
 
210
                public Result signal_playback_playtime();
 
211
 
 
212
                /*
 
213
                 * Playlist functions
 
214
                 */
 
215
                public Result playlist_list();
 
216
                public Result playlist_create(string playlist);
 
217
                public Result playlist_shuffle(string playlist);
 
218
                public Result playlist_add_full(string playlist, string url, Xmms.Value args);
 
219
                public Result playlist_add_url(string playlist, string url);
 
220
                public Result playlist_add_id(string playlist, uint id);
 
221
                public Result playlist_add_encoded(string playlist, string url);
 
222
                public Result playlist_add_idlist(string playlist, Collection coll);
 
223
                [CCode (array_length = false)]
 
224
                public Result playlist_add_collection(string playlist, Collection coll, Xmms.Value? order);
 
225
                public Result playlist_remove_entry(string playlist, uint id);
 
226
                public Result playlist_clear(string playlist);
 
227
                public Result playlist_remove(string playlist);
 
228
                public Result playlist_list_entries(string playlist = "Default");
 
229
                [CCode (array_length = false)]
 
230
                public Result playlist_sort(string playlist, Xmms.Value order);
 
231
                public Result playlist_set_next(uint pos);
 
232
                public Result playlist_set_next_rel(int pos);
 
233
                public Result playlist_move_entry(string playlist, uint from, uint to);
 
234
                public Result playlist_current_pos(string playlist);
 
235
                public Result playlist_current_active();
 
236
                public Result playlist_insert_full(string playlist, int pos, string url, Xmms.Value args);
 
237
                public Result playlist_insert_url(string playlist, int pos, string url);
 
238
                public Result playlist_insert_id(string playlist, int pos, uint id);
 
239
                public Result playlist_insert_encoded(string playlist, int pos, string url);
 
240
                [CCode (array_length = false)]
 
241
                public Result playlist_insert_collection(string playlist, int pos, Xmms.Collection coll, Xmms.Value? order);
 
242
                public Result playlist_load(string playlist);
 
243
                public Result playlist_radd(string playlist, string url);
 
244
                public Result playlist_radd_encoded(string playlist, string url);
 
245
                public Result broadcast_playlist_changed();
 
246
                public Result broadcast_playlist_current_pos();
 
247
                public Result broadcast_playlist_loaded();
 
248
 
 
249
                /*
 
250
                 * Medialib functions
 
251
                 */
 
252
                public Result medialib_add_entry(string url);
 
253
                public Result medialib_add_entry_full(string url, Xmms.Value args);
 
254
                public Result medialib_add_entry_encoded(string url);
 
255
                public Result medialib_get_info(uint id);
 
256
                public Result medialib_import_path(string path);
 
257
                public Result medialib_import_path_encoded(string path);
 
258
                public Result medialib_rehash(uint id);
 
259
                public Result medialib_get_id(string url);
 
260
                public Result medialib_remove_entry(uint entry);
 
261
                public Result medialib_move_entry(uint entry, string url);
 
262
                public Result medialib_entry_property_set_int(uint id, string key, int val);
 
263
                public Result medialib_entry_property_set_int_with_source(uint id, string source, string key, int val);
 
264
                public Result medialib_entry_property_set_str(uint id, string key, string val);
 
265
                public Result medialib_entry_property_set_str_with_source(uint id, string source, string key, string val);
 
266
                public Result medialib_entry_property_remove(uint id, string key);
 
267
                public Result medialib_entry_property_remove_with_source(uint id, string source, string key);
 
268
                public Result broadcast_medialib_entry_changed();
 
269
                public Result broadcast_medialib_entry_added();
 
270
                public Result broadcast_mediainfo_reader_status();
 
271
                public Result signal_mediainfo_reader_unindexed();
 
272
 
 
273
                /*
 
274
                 * Config functions
 
275
                 */
 
276
                public Result config_set_value(string key, string val);
 
277
                public Result config_list_values();
 
278
                public Result config_get_value(string key);
 
279
                public Result config_register_value(string valuename, string defaultvalue);
 
280
                public Result broadcast_config_value_changed();
 
281
 
 
282
                /*
 
283
                 * Browse functions
 
284
                 */
 
285
                public Result xform_media_browse(string url);
 
286
                public Result xform_media_browse_encoded(string url);
 
287
 
 
288
                /*
 
289
                 * Bindata functions
 
290
                 */
 
291
                public Result bindata_add (uint8[] data);
 
292
                public Result bindata_retrieve(string hash);
 
293
                public Result bindata_remove(string hash);
 
294
 
 
295
                /*
 
296
                 * Collection functions
 
297
                 */
 
298
                public Result coll_get(string collname, string ns);
 
299
                public Result coll_list(string ns);
 
300
                public Result coll_save(Collection c, string name, string ns);
 
301
                public Result coll_remove(string name, string ns);
 
302
                public Result coll_find(uint mediaid, string ns);
 
303
                public Result coll_rename(string from_name, string to_name, string ns);
 
304
                public Result coll_idlist_from_playlist_file(string path);
 
305
                public Result coll_sync();
 
306
                [CCode (array_length = false)]
 
307
                public Result coll_query_ids(Collection coll, Xmms.Value order, uint limit_start = 0, uint limit_len = 0);
 
308
                [CCode (array_length = false)]
 
309
                public Result coll_query_infos(Collection coll, Xmms.Value order, uint limit_start = 0, uint limit_len = 0, Xmms.Value? fetch = null, Xmms.Value? group = null);
 
310
                public Result broadcast_collection_changed();
 
311
 
 
312
                /*
 
313
                 * Other functions
 
314
                 */
 
315
                public static unowned string? userconfdir_get (char[] buffer=new char[PATH_MAX]);
 
316
                public string get_last_error ();
 
317
                public Result quit();
 
318
                public Result broadcast_quit ();
 
319
                public void disconnect_callback_set (DisconnectFunc func);
 
320
                public void disconnect_callback_set_full (DisconnectFunc func, UserDataFreeFunc ufunc);
 
321
                public Result main_list_plugins (Xmms.PluginType type = Xmms.PluginType.ALL);
 
322
                public Result main_stats ();
 
323
                public Result signal_visualisation_data ();
 
324
        }
 
325
 
 
326
        [Compact]
 
327
        [CCode(cname="xmmsv_coll_t", cprefix="xmmsv_coll_", ref_function="xmmsv_coll_ref", unref_function="xmmsv_coll_unref")]
 
328
        public class Collection {
 
329
                [CCode (cname = "xmmsc_coll_new")]
 
330
                public Collection(CollectionType type);
 
331
                public void set_idlist([CCode (array_length = false)] int[] ids);
 
332
                public void add_operand(Collection op);
 
333
                public void remove_operand(Collection op);
 
334
 
 
335
                public bool idlist_append(int id);
 
336
                public bool idlist_insert(int index, int id);
 
337
                public bool idlist_move(int index, int newindex);
 
338
                public bool idlist_remove(int index);
 
339
                public bool idlist_clear();
 
340
                public bool idlist_get_index(int index, out int val);
 
341
                public bool idlist_set_index(int index, int val);
 
342
                public uint idlist_get_size();
 
343
 
 
344
                public CollectionType get_type();
 
345
                public uint[] get_idlist();
 
346
 
 
347
                public bool operand_list_first();
 
348
                public bool operand_list_valid();
 
349
                public bool operand_list_entry(out Collection operand);
 
350
                public bool operand_list_next();
 
351
                public bool operand_list_save();
 
352
                public bool operand_list_restore();
 
353
                public void operand_list_clear();
 
354
 
 
355
                public void attribute_list_first();
 
356
                public bool attribute_list_valid();
 
357
                public void attribute_list_entry(out unowned string key, out unowned string val);
 
358
                public void attribute_list_next();
 
359
                public void attribute_set(string key, string val);
 
360
                public bool attribute_remove(string key);
 
361
                public bool attribute_get(string key, out unowned string val);
 
362
                public void attribute_foreach(CollectionAttributeForeachFunc func);
 
363
 
 
364
                public static Collection universe();
 
365
                public static bool parse(string pattern, out Collection coll);
 
366
                public static bool parse_custom(string pattern, CollectionParseTokensFunc tokens_func, CollectionParseBuildFunc build_func, out Collection coll);
 
367
                public static Collection default_parse_build(CollectionToken[] tokens);
 
368
                public static CollectionToken[] default_parse_tokens(string str, out unowned string newpos);
 
369
        }
 
370
 
 
371
 
 
372
        [Compact]
 
373
        [CCode(cname="xmmsc_result_t", cprefix="xmmsc_result_", ref_function="xmmsc_result_ref", unref_function="xmmsc_result_unref")]
 
374
        public class Result
 
375
        {
 
376
                public ResultType get_class();
 
377
                public void disconnect();
 
378
                public unowned Xmms.Value get_value();
 
379
                public void notifier_set(NotifierFunc func);
 
380
                public void notifier_set_full(NotifierFunc func, UserDataFreeFunc free_func);
 
381
                public void wait();
 
382
        }
 
383
 
 
384
        [Compact]
 
385
        [CCode(cname="xmmsv_t", cprefix="xmmsv_", ref_function="xmmsv_ref", unref_function="xmmsv_unref")]
 
386
        public class Value {
 
387
                [CCode(cname="xmmsv_new_none")]
 
388
                public Value.from_none();
 
389
                [CCode(cname="xmmsv_new_int")]
 
390
                public Value.from_int(int val);
 
391
                [CCode(cname="xmmsv_new_uint")]
 
392
                public Value.from_uint(uint val);
 
393
                [CCode(cname="xmmsv_new_string")]
 
394
                public Value.from_string(string val);
 
395
                [CCode(cname="xmmsv_new_coll")]
 
396
                public Value.from_coll(Xmms.Collection val);
 
397
                [CCode(cname="xmmsv_new_bin")]
 
398
                public Value.from_bin(uint8[] val);
 
399
                [CCode(cname="xmmsv_new_list")]
 
400
                public Value.from_list();
 
401
                [CCode(cname="xmmsv_new_dict")]
 
402
                public Value.from_dict();
 
403
 
 
404
                public bool is_error();
 
405
                public bool is_type(Xmms.ValueType typ);
 
406
 
 
407
                public Xmms.ValueType get_type();
 
408
 
 
409
                public bool get_error (out unowned string error);
 
410
                public bool get_int (out int val);
 
411
                public bool get_string (out unowned string val);
 
412
                public bool get_coll (out unowned Xmms.Collection coll);
 
413
                public bool get_bin ([CCode(type="const unsigned char **", array_length_type="uint")] out unowned uint8[] val);
 
414
 
 
415
                public bool list_get(int pos, out Xmms.Value val);
 
416
                public bool list_set(Xmms.Value val);
 
417
                public bool list_append(Xmms.Value val);
 
418
                public bool list_insert(int pos, Xmms.Value val);
 
419
                public bool list_remove(int pos);
 
420
                public bool list_move(int oldpos, int newpos);
 
421
                public bool list_clear();
 
422
                public int  list_get_size();
 
423
                public bool list_restrict_type(Xmms.ValueType type);
 
424
 
 
425
                public bool list_get_string (int pos, out unowned string val);
 
426
                public bool list_get_int (int pos, out int val);
 
427
                public bool list_get_coll (int pos, out unowned Xmms.Collection val);
 
428
 
 
429
                public bool list_set_string (int pos, string val);
 
430
                public bool list_set_int (int pos, int val);
 
431
                public bool list_set_coll (int pos, Xmms.Collection val);
 
432
 
 
433
                public bool list_insert_string (int pos, string val);
 
434
                public bool list_insert_int (int pos, int val);
 
435
                public bool list_insert_coll (int pos, Xmms.Collection val);
 
436
 
 
437
                public bool list_append_string (string val);
 
438
                public bool list_append_int (int val);
 
439
                public bool list_append_coll (Xmms.Collection val);
 
440
 
 
441
                public bool list_foreach(Xmms.ListForeachFunc func);
 
442
 
 
443
                public bool get_list_iter (out unowned Xmms.ListIter iter);
 
444
 
 
445
                public bool dict_get(string key, out unowned Xmms.Value val);
 
446
                public bool dict_set(string key, Xmms.Value val);
 
447
                public bool dict_remove(string key);
 
448
                public bool dict_clear();
 
449
                public int dict_get_size();
 
450
                public bool has_key(string key);
 
451
 
 
452
                public bool dict_entry_get_string(string key, out unowned string val);
 
453
                public bool dict_entry_get_int(string key, out int val);
 
454
                public bool dict_entry_get_uint(string key, out uint val);
 
455
                public bool dict_entry_get_collection(string key, out Xmms.Collection coll);
 
456
 
 
457
                public bool dict_set_string (string key, string val);
 
458
                public bool dict_set_int (string key, int val);
 
459
                public bool dict_set_coll (string key, Xmms.Collection val);
 
460
 
 
461
                public Xmms.ValueType dict_entry_get_type(string key);
 
462
 
 
463
                public bool dict_foreach(Xmms.DictForeachFunc func);
 
464
 
 
465
                public bool get_dict_iter (out unowned Xmms.DictIter iter);
 
466
 
 
467
                public Xmms.Value propdict_to_dict([CCode (array_length = false)] string[]? prefs=null);
 
468
        }
 
469
 
 
470
        [Compact]
 
471
        [CCode(cname = "xmmsv_list_iter_t", cprefix = "xmmsv_list_iter_", free_function="xmmsv_list_iter_explicit_destroy")]
 
472
        public class ListIter {
 
473
                public bool entry(out unowned Xmms.Value val);
 
474
                public bool valid();
 
475
                public void first();
 
476
                public void last();
 
477
                public void next();
 
478
                public void prev();
 
479
                public bool seek(int pos);
 
480
                public int tell();
 
481
                public unowned Xmms.Value get_parent ();
 
482
 
 
483
                public bool insert(Xmms.Value val);
 
484
                public bool remove();
 
485
 
 
486
                public bool entry_string (out unowned string val);
 
487
                public bool entry_int (out int val);
 
488
                public bool entry_coll (out unowned Xmms.Collection val);
 
489
 
 
490
                public bool insert_string (string val);
 
491
                public bool insert_int (int val);
 
492
                public bool insert_coll (Xmms.Collection val);
 
493
        }
 
494
 
 
495
        [Compact]
 
496
        [CCode(cname = "xmmsv_dict_iter_t",     cprefix = "xmmsv_dict_iter_", free_function="xmmsv_dict_iter_explicit_destroy")]
 
497
        public class DictIter {
 
498
                public bool pair(out unowned string key, out unowned Xmms.Value val);
 
499
                public bool pair_int(out unowned string key, out int val);
 
500
                public bool pair_string(out unowned string key, out unowned string val);
 
501
                public bool pair_coll(out unowned string key, out unowned Xmms.Collection val);
 
502
                public bool valid();
 
503
                public void first();
 
504
                public void next();
 
505
                public bool find(string key);
 
506
                public bool set(Xmms.Value val);
 
507
                public bool set_int(int val);
 
508
                public bool set_string(string val);
 
509
                public bool set_coll(Xmms.Collection val);
 
510
                public bool remove();
 
511
        }
 
512
}