| a513e45 by Alberto Garcia at 2007-11-25 | 1 | /* |
| 2 | * dbus.h -- D-BUS interface |
|
| df3cdaf by Alberto Garcia at 2009-02-11 | 3 | * |
| 4 | * Copyright (C) 2007-2008 Igalia, S.L. |
|
| 5 | * Authors: Mario Sanchez Prada <msanchez@igalia.com> |
|
| 6 | * Alberto Garcia <agarcia@igalia.com> |
|
| a513e45 by Alberto Garcia at 2007-11-25 | 7 | * |
| 3d431d6 by Alberto Garcia at 2008-02-15 | 8 | * This file is part of Vagalume and is published under the GNU GPLv3 |
| 9 | * See the README file for more details. |
|
| a513e45 by Alberto Garcia at 2007-11-25 | 10 | */ |
| 11 | ||
| 12 | #ifndef VAGALUME_DBUS_H |
|
| 13 | #define VAGALUME_DBUS_H |
|
| 14 | ||
| 15 | #include "globaldefs.h" |
|
| 9fe95eb by Alberto Garcia at 2008-06-16 | 16 | #include "playlist.h" |
| ad3ff5c by Alberto Garcia at 2008-11-22 | 17 | #include "controller.h" |
| a513e45 by Alberto Garcia at 2007-11-25 | 18 | |
| 19 | #define APP_DBUS_SERVICE "com.igalia." APP_NAME_LC |
|
| 20 | #define APP_DBUS_OBJECT "/com/igalia/" APP_NAME_LC |
|
| 21 | #define APP_DBUS_IFACE APP_DBUS_SERVICE |
|
| 9d8a525 by Mario Sanchez Prada at 2008-06-18 | 22 | |
| 23 | /* D-Bus methods */ |
|
| a513e45 by Alberto Garcia at 2007-11-25 | 24 | #define APP_DBUS_METHOD_PLAYURL "PlayUrl" |
| 25 | #define APP_DBUS_METHOD_PLAY "Play" |
|
| 26 | #define APP_DBUS_METHOD_STOP "Stop" |
|
| 27 | #define APP_DBUS_METHOD_SKIP "Skip" |
|
| 28 | #define APP_DBUS_METHOD_LOVETRACK "LoveTrack" |
|
| 29 | #define APP_DBUS_METHOD_BANTRACK "BanTrack" |
|
| 30 | #define APP_DBUS_METHOD_SHOWWINDOW "ShowWindow" |
|
| 31 | #define APP_DBUS_METHOD_HIDEWINDOW "HideWindow" |
|
| 32 | #define APP_DBUS_METHOD_CLOSEAPP "CloseApp" |
|
| fed6d7b by Alberto Garcia at 2008-04-20 | 33 | #define APP_DBUS_METHOD_VOLUMEUP "VolumeUp" |
| 34 | #define APP_DBUS_METHOD_VOLUMEDOWN "VolumeDown" |
|
| 87d58aa by Alberto Garcia at 2008-05-03 | 35 | #define APP_DBUS_METHOD_SETVOLUME "SetVolume" |
| 711a712 by Alberto Garcia at 2007-11-25 | 36 | #define APP_DBUS_METHOD_TOPAPP "top_application" |
| 520085c by Mario Sanchez Prada at 2008-01-30 | 37 | #define APP_DBUS_METHOD_REQUEST_STATUS "request_status" |
| 38 | ||
| 9d8a525 by Mario Sanchez Prada at 2008-06-18 | 39 | /* D-Bus signals */ |
| 40 | #define APP_DBUS_SIGNAL_NOTIFY "notify" |
|
| 41 | #define APP_DBUS_SIGNAL_NOTIFY_PLAYING "playing" |
|
| 42 | #define APP_DBUS_SIGNAL_NOTIFY_STOPPED "stopped" |
|
| 43 | #define APP_DBUS_SIGNAL_NOTIFY_STARTED "started" |
|
| 44 | #define APP_DBUS_SIGNAL_NOTIFY_CLOSING "closing" |
|
| a513e45 by Alberto Garcia at 2007-11-25 | 45 | |
| 29c1487 by Mario Sanchez Prada at 2008-06-25 | 46 | #ifdef HAVE_GSD_MEDIA_PLAYER_KEYS |
| 47 | ||
| 48 | /* Gnome Settings Daemon - Media Player Keys D-Bus interface */ |
|
| 49 | #define GSD_DBUS_SERVICE "org.gnome.SettingsDaemon" |
|
| 50 | #define GSD_DBUS_MK_OBJECT "/org/gnome/SettingsDaemon/MediaKeys" |
|
| 51 | #define GSD_DBUS_MK_IFACE GSD_DBUS_SERVICE ".MediaKeys" |
|
| 52 | ||
| 53 | #define GSD_DBUS_MK_GRAB_KEYS "GrabMediaPlayerKeys" |
|
| 54 | #define GSD_DBUS_MK_RELEASE_KEYS "ReleaseMediaPlayerKeys" |
|
| 55 | #define GSD_DBUS_MK_KEYPRESSED "MediaPlayerKeyPressed" |
|
| 56 | #define GSD_DBUS_MK_KEYPRESSED_STOP "Stop" |
|
| 57 | #define GSD_DBUS_MK_KEYPRESSED_PLAY "Play" |
|
| 58 | #define GSD_DBUS_MK_KEYPRESSED_PREVIOUS "Previous" |
|
| 59 | #define GSD_DBUS_MK_KEYPRESSED_NEXT "Next" |
|
| 60 | ||
| 61 | #endif /* HAVE_GSD_MEDIA_PLAYER_KEYS */ |
|
| 62 | ||
| 037c8e5 by Alberto Garcia at 2008-07-10 | 63 | typedef enum { |
| 64 | DBUS_INIT_OK, |
|
| 65 | DBUS_INIT_ERROR, |
|
| 66 | DBUS_INIT_ALREADY_RUNNING |
|
| 67 | } DbusInitReturnCode; |
|
| 68 | ||
| e13e98f by Alberto Garcia at 2009-04-03 | 69 | DbusInitReturnCode |
| 70 | lastfm_dbus_init (VglController *controller); |
|
| 71 | ||
| 72 | void |
|
| 73 | lastfm_dbus_close (void); |
|
| 74 | ||
| 75 | void |
|
| 76 | lastfm_dbus_notify_playback (LastfmTrack *track); |
|
| 77 | ||
| 78 | void |
|
| 79 | lastfm_dbus_notify_started (void); |
|
| 80 | ||
| 81 | void |
|
| 82 | lastfm_dbus_notify_closing (void); |
|
| 83 | ||
| 84 | void |
|
| 85 | lastfm_dbus_play_radio_url (const char *url); |
|
| a513e45 by Alberto Garcia at 2007-11-25 | 86 | |
| 87 | #endif |

