Mercurial > audlegacy
comparison src/audacious/plugin.h @ 3738:48a596a86459
export Playlist API, remove old crap that isn't there anymore
| author | William Pitcock <nenolod@atheme.org> |
|---|---|
| date | Sat, 13 Oct 2007 23:01:28 -0500 |
| parents | 269449ad845e |
| children | a0add4e37ee0 |
comparison
equal
deleted
inserted
replaced
| 3737:9c4633afc0a8 | 3738:48a596a86459 |
|---|---|
| 86 typedef struct _DiscoveryPlugin DiscoveryPlugin; | 86 typedef struct _DiscoveryPlugin DiscoveryPlugin; |
| 87 typedef struct _LowlevelPlugin LowlevelPlugin; | 87 typedef struct _LowlevelPlugin LowlevelPlugin; |
| 88 | 88 |
| 89 typedef struct _InputPlayback InputPlayback; | 89 typedef struct _InputPlayback InputPlayback; |
| 90 | 90 |
| 91 #include "audacious/playlist.h" | |
| 91 #include "audacious/mime.h" | 92 #include "audacious/mime.h" |
| 92 #include "audacious/custom_uri.h" | 93 #include "audacious/custom_uri.h" |
| 93 | 94 |
| 94 #define PLUGIN_COMMON_FIELDS \ | 95 #define PLUGIN_COMMON_FIELDS \ |
| 95 gpointer handle; \ | 96 gpointer handle; \ |
| 314 void (*playlist_container_register)(PlaylistContainer *plc); | 315 void (*playlist_container_register)(PlaylistContainer *plc); |
| 315 void (*playlist_container_unregister)(PlaylistContainer *plc); | 316 void (*playlist_container_unregister)(PlaylistContainer *plc); |
| 316 void (*playlist_container_read)(gchar *filename, gint pos); | 317 void (*playlist_container_read)(gchar *filename, gint pos); |
| 317 void (*playlist_container_write)(gchar *filename, gint pos); | 318 void (*playlist_container_write)(gchar *filename, gint pos); |
| 318 PlaylistContainer *(*playlist_container_find)(gchar *ext); | 319 PlaylistContainer *(*playlist_container_find)(gchar *ext); |
| 320 | |
| 321 /* Playlist API */ | |
| 322 PlaylistEntry *(*playlist_entry_new)(const gchar * filename, | |
| 323 const gchar * title, const gint len, | |
| 324 InputPlugin * dec); | |
| 325 void (*playlist_entry_free)(PlaylistEntry * entry); | |
| 326 | |
| 327 void (*playlist_add_playlist)(Playlist *); | |
| 328 void (*playlist_remove_playlist)(Playlist *); | |
| 329 void (*playlist_select_playlist)(Playlist *); | |
| 330 void (*playlist_select_next)(void); | |
| 331 void (*playlist_select_prev)(void); | |
| 332 GList *(*playlist_get_playlists)(void); | |
| 333 | |
| 334 void (*playlist_clear_only)(Playlist *playlist); | |
| 335 void (*playlist_clear)(Playlist *playlist); | |
| 336 void (*playlist_delete)(Playlist *playlist, gboolean crop); | |
| 337 | |
| 338 gboolean (*playlist_add)(Playlist *playlist, const gchar * filename); | |
| 339 gboolean (*playlist_ins)(Playlist *playlist, const gchar * filename, gint pos); | |
| 340 guint (*playlist_add_dir)(Playlist *playlist, const gchar * dir); | |
| 341 guint (*playlist_ins_dir)(Playlist *playlist, const gchar * dir, gint pos, gboolean background); | |
| 342 guint (*playlist_add_url)(Playlist *playlist, const gchar * url); | |
| 343 guint (*playlist_ins_url)(Playlist *playlist, const gchar * string, gint pos); | |
| 344 | |
| 345 void (*playlist_check_pos_current)(Playlist *playlist); | |
| 346 void (*playlist_next)(Playlist *playlist); | |
| 347 void (*playlist_prev)(Playlist *playlist); | |
| 348 void (*playlist_queue)(Playlist *playlist); | |
| 349 void (*playlist_queue_position)(Playlist *playlist, guint pos); | |
| 350 void (*playlist_queue_remove)(Playlist *playlist, guint pos); | |
| 351 gint (*playlist_queue_get_length)(Playlist *playlist); | |
| 352 gboolean (*playlist_is_position_queued)(Playlist *playlist, guint pos); | |
| 353 void (*playlist_clear_queue)(Playlist *playlist); | |
| 354 gint (*playlist_get_queue_position)(Playlist *playlist, PlaylistEntry * entry); | |
| 355 gint (*playlist_get_queue_position_number)(Playlist *playlist, guint pos); | |
| 356 gint (*playlist_get_queue_qposition_number)(Playlist *playlist, guint pos); | |
| 357 void (*playlist_eof_reached)(Playlist *playlist); | |
| 358 void (*playlist_set_position)(Playlist *playlist, guint pos); | |
| 359 gint (*playlist_get_length)(Playlist *playlist); | |
| 360 gint (*playlist_get_position)(Playlist *playlist); | |
| 361 gint (*playlist_get_position_nolock)(Playlist *playlist); | |
| 362 gchar *(*playlist_get_info_text)(Playlist *playlist); | |
| 363 gint (*playlist_get_current_length)(Playlist *playlist); | |
| 364 | |
| 365 gboolean (*playlist_save)(Playlist *playlist, const gchar * filename); | |
| 366 gboolean (*playlist_load)(Playlist *playlist, const gchar * filename); | |
| 367 | |
| 368 void (*playlist_sort)(Playlist *playlist, PlaylistSortType type); | |
| 369 void (*playlist_sort_selected)(Playlist *playlist, PlaylistSortType type); | |
| 370 | |
| 371 void (*playlist_reverse)(Playlist *playlist); | |
| 372 void (*playlist_random)(Playlist *playlist); | |
| 373 void (*playlist_remove_duplicates)(Playlist *playlist, PlaylistDupsType); | |
| 374 void (*playlist_remove_dead_files)(Playlist *playlist); | |
| 375 | |
| 376 void (*playlist_fileinfo_current)(Playlist *playlist); | |
| 377 void (*playlist_fileinfo)(Playlist *playlist, guint pos); | |
| 378 | |
| 379 void (*playlist_delete_index)(Playlist *playlist, guint pos); | |
| 380 void (*playlist_delete_filenames)(Playlist *playlist, GList * filenames); | |
| 381 | |
| 382 PlaylistEntry *(*playlist_get_entry_to_play)(Playlist *playlist); | |
| 383 | |
| 384 gchar *(*playlist_get_filename)(Playlist *playlist, guint pos); | |
| 385 gchar *(*playlist_get_songtitle)(Playlist *playlist, guint pos); | |
| 386 Tuple *(*playlist_get_tuple)(Playlist *playlist, guint pos); | |
| 387 gint (*playlist_get_songtime)(Playlist *playlist, guint pos); | |
| 388 | |
| 389 GList *(*playlist_get_selected)(Playlist *playlist); | |
| 390 int (*playlist_get_num_selected)(Playlist *playlist); | |
| 391 | |
| 392 void (*playlist_get_total_time)(Playlist *playlist, gulong * total_time, gulong * selection_time, | |
| 393 gboolean * total_more, | |
| 394 gboolean * selection_more); | |
| 395 | |
| 396 gint (*playlist_select_search)(Playlist *playlist, Tuple *tuple, gint action); | |
| 397 void (*playlist_select_all)(Playlist *playlist, gboolean set); | |
| 398 void (*playlist_select_range)(Playlist *playlist, gint min, gint max, gboolean sel); | |
| 399 void (*playlist_select_invert_all)(Playlist *playlist); | |
| 400 gboolean (*playlist_select_invert)(Playlist *playlist, guint pos); | |
| 401 | |
| 402 gboolean (*playlist_read_info_selection)(Playlist *playlist); | |
| 403 void (*playlist_read_info)(Playlist *playlist, guint pos); | |
| 404 | |
| 405 void (*playlist_set_shuffle)(gboolean shuffle); | |
| 406 | |
| 407 void (*playlist_clear_selected)(Playlist *playlist); | |
| 408 | |
| 409 GList *(*get_playlist_nth)(Playlist *playlist, guint); | |
| 410 | |
| 411 gboolean (*playlist_set_current_name)(Playlist *playlist, const gchar * title); | |
| 412 const gchar *(*playlist_get_current_name)(Playlist *playlist); | |
| 413 | |
| 414 gboolean (*playlist_filename_set)(Playlist *playlist, const gchar * filename); | |
| 415 | |
| 416 gchar *(*playlist_filename_get)(Playlist *playlist); | |
| 417 | |
| 418 Playlist *(*playlist_new)(void); | |
| 419 void (*playlist_free)(Playlist *playlist); | |
| 420 Playlist *(*playlist_new_from_selected)(void); | |
| 421 | |
| 422 gboolean (*is_playlist_name)(const gchar * filename); | |
| 423 | |
| 424 void (*playlist_load_ins_file)(Playlist *playlist, const gchar * filename, | |
| 425 const gchar * playlist_name, gint pos, | |
| 426 const gchar * title, gint len); | |
| 427 | |
| 428 void (*playlist_load_ins_file_tuple)(Playlist *playlist, const gchar * filename_p, | |
| 429 const gchar * playlist_name, gint pos, | |
| 430 Tuple *tuple); | |
| 431 | |
| 432 Playlist *(*playlist_get_active)(void); | |
| 433 | |
| 434 gboolean (*playlist_playlists_equal)(Playlist *p1, Playlist *p2); | |
| 435 | |
| 319 }; | 436 }; |
| 320 | 437 |
| 321 /* Convenience macros for accessing the public API. */ | 438 /* Convenience macros for accessing the public API. */ |
| 322 /* public name vtable mapping */ | 439 /* public name vtable mapping */ |
| 323 #define aud_vfs_fopen _audvt->vfs_fopen | 440 #define aud_vfs_fopen _audvt->vfs_fopen |
| 425 #define aud_playlist_container_unregister _audvt->playlist_container_unregister | 542 #define aud_playlist_container_unregister _audvt->playlist_container_unregister |
| 426 #define aud_playlist_container_read _audvt->playlist_container_read | 543 #define aud_playlist_container_read _audvt->playlist_container_read |
| 427 #define aud_playlist_container_write _audvt->playlist_container_write | 544 #define aud_playlist_container_write _audvt->playlist_container_write |
| 428 #define aud_playlist_container_find _audvt->playlist_container_find | 545 #define aud_playlist_container_find _audvt->playlist_container_find |
| 429 | 546 |
| 547 #define aud_playlist_entry_new _audvt->playlist_entry_new | |
| 548 #define aud_playlist_entry_free _audvt->playlist_entry_free | |
| 549 | |
| 550 #define aud_playlist_add_playlist _audvt->playlist_add_playlist | |
| 551 #define aud_playlist_remove_playlist _audvt->playlist_remove_playlist | |
| 552 #define aud_playlist_select_playlist _audvt->playlist_select_playlist | |
| 553 #define aud_playlist_select_next _audvt->playlist_select_next | |
| 554 #define aud_playlist_select_prev _audvt->playlist_select_prev | |
| 555 #define aud_playlist_get_playlists _audvt->playlist_get_playlists | |
| 556 | |
| 557 #define aud_playlist_clear_only _audvt->playlist_clear_only | |
| 558 #define aud_playlist_clear _audvt->playlist_clear | |
| 559 #define aud_playlist_delete _audvt->playlist_delete | |
| 560 | |
| 561 #define aud_playlist_add _audvt->playlist_add | |
| 562 #define aud_playlist_ins _audvt->playlist_ins | |
| 563 #define aud_playlist_add_dir _audvt->playlist_add_dir | |
| 564 #define aud_playlist_ins_dir _audvt->playlist_ins_dir | |
| 565 #define aud_playlist_add_url _audvt->playlist_add_url | |
| 566 #define aud_playlist_ins_url _audvt->playlist_ins_url | |
| 567 | |
| 568 #define aud_playlist_check_pos_current _audvt->playlist_check_pos_current | |
| 569 #define aud_playlist_next _audvt->playlist_next | |
| 570 #define aud_playlist_prev _audvt->playlist_prev | |
| 571 | |
| 572 #define aud_playlist_queue _audvt->playlist_queue | |
| 573 #define aud_playlist_queue_position _audvt->playlist_queue_position | |
| 574 #define aud_playlist_queue_remove _audvt->playlist_queue_remove | |
| 575 #define aud_playlist_queue_get_length _audvt->playlist_queue_get_length | |
| 576 #define aud_playlist_is_position_queued _audvt->playlist_is_position_queued | |
| 577 #define aud_playlist_clear_queue _audvt->playlist_clear_queue | |
| 578 #define aud_playlist_get_queue_position _audvt->playlist_get_queue_position | |
| 579 #define aud_playlist_get_queue_position_number _audvt->playlist_get_queue_position_number | |
| 580 #define aud_playlist_get_queue_qposition_number _audvt->playlist_get_queue_qposition_number | |
| 581 #define aud_playlist_eof_reached _audvt->playlist_eof_reached | |
| 582 #define aud_playlist_set_position _audvt->playlist_set_position | |
| 583 #define aud_playlist_get_length _audvt->playlist_get_length | |
| 584 #define aud_playlist_get_position _audvt->playlist_get_position | |
| 585 #define aud_playlist_get_position_nolock _audvt->playlist_get_position_nolock | |
| 586 #define aud_playlist_get_info_text _audvt->playlist_get_info_text | |
| 587 #define aud_playlist_get_current_length _audvt->playlist_get_current_length | |
| 588 | |
| 589 #define aud_playlist_save _audvt->playlist_save | |
| 590 #define aud_playlist_load _audvt->playlist_load | |
| 591 | |
| 592 #define aud_playlist_sort _audvt->playlist_sort | |
| 593 #define aud_playlist_sort_selected _audvt->playlist_sort_selected | |
| 594 | |
| 595 #define aud_playlist_reverse _audvt->playlist_reverse | |
| 596 #define aud_playlist_random _audvt->playlist_random | |
| 597 #define aud_playlist_remove_duplicates _audvt->playlist_remove_duplicates | |
| 598 #define aud_playlist_remove_dead_files _audvt->playlist_remove_dead_files | |
| 599 | |
| 600 #define aud_playlist_fileinfo_current _audvt->playlist_fileinfo_current | |
| 601 #define aud_playlist_fileinfo _audvt->playlist_fileinfo | |
| 602 | |
| 603 #define aud_playlist_delete_index _audvt->playlist_delete_index | |
| 604 #define aud_playlist_delete_filenames _audvt->playlist_delete_filenames | |
| 605 | |
| 606 #define aud_playlist_get_entry_to_play _audvt->playlist_get_entry_to_play | |
| 607 | |
| 608 #define aud_playlist_get_filename _audvt->playlist_get_filename | |
| 609 #define aud_playlist_get_songtitle _audvt->playlist_get_songtitle | |
| 610 #define aud_playlist_get_tuple _audvt->playlist_get_tuple | |
| 611 #define aud_playlist_get_songtime _audvt->playlist_get_songtime | |
| 612 | |
| 613 #define aud_playlist_get_selected _audvt->playlist_get_selected | |
| 614 #define aud_playlist_get_num_selected _audvt->playlist_get_num_selected | |
| 615 | |
| 616 #define aud_playlist_get_total_time _audvt->playlist_get_total_time | |
| 617 | |
| 618 #define aud_playlist_select_search _audvt->playlist_select_search | |
| 619 #define aud_playlist_select_all _audvt->playlist_select_all | |
| 620 #define aud_playlist_select_range _audvt->playlist_select_range | |
| 621 #define aud_playlist_select_invert_all _audvt->playlist_select_invert_all | |
| 622 #define aud_playlist_select_invert _audvt->playlist_select_invert | |
| 623 | |
| 624 #define aud_playlist_read_info_selection _audvt->playlist_read_info_selection | |
| 625 #define aud_playlist_read_info _audvt->playlist_read_info | |
| 626 | |
| 627 #define aud_playlist_set_shuffle _audvt->playlist_set_shuffle | |
| 628 | |
| 629 #define aud_playlist_clear_selected _audvt->playlist_clear_selected | |
| 630 | |
| 631 #define aud_get_playlist_nth _audvt->get_playlist_nth | |
| 632 | |
| 633 #define aud_playlist_set_current_name _audvt->playlist_set_current_name | |
| 634 #define aud_playlist_get_current_name _audvt->playlist_get_current_name | |
| 635 | |
| 636 #define aud_playlist_filename_set _audvt->playlist_filename_set | |
| 637 #define aud_playlist_filename_get _audvt->playlist_filename_get | |
| 638 | |
| 639 #define aud_playlist_new _audvt->playlist_new | |
| 640 #define aud_playlist_free _audvt->playlist_free | |
| 641 #define aud_playlist_new_from_selected _audvt->playlist_new_from_selected | |
| 642 | |
| 643 #define aud_is_playlist_name _audvt->is_playlist_name | |
| 644 | |
| 645 #define aud_playlist_load_ins_file _audvt->playlist_load_ins_file | |
| 646 #define aud_playlist_load_ins_file_tuple _audvt->playlist_load_ins_file_tuple | |
| 647 | |
| 648 #define aud_playlist_get_active _audvt->playlist_get_active | |
| 649 #define aud_playlist_playlists_equal _audvt->playlist_playlists_equal | |
| 650 | |
| 430 /* for multi-file plugins :( */ | 651 /* for multi-file plugins :( */ |
| 431 extern struct _AudaciousFuncTableV1 *_audvt; | 652 extern struct _AudaciousFuncTableV1 *_audvt; |
| 432 | 653 |
| 433 #define DECLARE_PLUGIN(name, init, fini, ...) \ | 654 #define DECLARE_PLUGIN(name, init, fini, ...) \ |
| 434 G_BEGIN_DECLS \ | 655 G_BEGIN_DECLS \ |
