qml: fix scrollbar in NetworkHomeDisplay
[vlc.git] / modules / control / dbus / dbus_player.h
1 /*****************************************************************************
2  * dbus_player.h : dbus control module (mpris v2.2) - Player object
3  *****************************************************************************
4  * Copyright © 2006-2008 Rafaël Carré
5  * Copyright © 2007-2010 Mirsal Ennaime
6  * Copyright © 2009-2010 The VideoLAN team
7  *
8  * Authors:    Mirsal Ennaime <mirsal at mirsal fr>
9  *             Rafaël Carré <funman at videolanorg>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 #ifndef VLC_DBUS_DBUS_PLAYER_H_
27 #define VLC_DBUS_DBUS_PLAYER_H_
28
29 #include <vlc_interface.h>
30 #include "dbus_common.h"
31
32 #define DBUS_MPRIS_PLAYER_INTERFACE    "org.mpris.MediaPlayer2.Player"
33
34 #define LOOP_STATUS_NONE  "None"
35 #define LOOP_STATUS_TRACK "Track"
36 #define LOOP_STATUS_PLAYLIST "Playlist"
37
38 #define PLAYBACK_STATUS_STOPPED "Stopped"
39 #define PLAYBACK_STATUS_PLAYING "Playing"
40 #define PLAYBACK_STATUS_PAUSED  "Paused"
41
42 /* Handle incoming dbus messages */
43 DBusHandlerResult handle_player ( DBusConnection *p_conn,
44                                   DBusMessage *p_from,
45                                   void *p_this );
46
47 /* Player capabilities */
48 enum
49 {
50      PLAYER_CAPS_NONE            = 0,
51      PLAYER_CAN_GO_NEXT          = 1 << 0,
52      PLAYER_CAN_GO_PREVIOUS      = 1 << 1,
53      PLAYER_CAN_PAUSE            = 1 << 2,
54      PLAYER_CAN_PLAY             = 1 << 3,
55      PLAYER_CAN_SEEK             = 1 << 4,
56      PLAYER_CAN_PROVIDE_METADATA = 1 << 5,
57      PLAYER_CAN_PROVIDE_POSITION = 1 << 6,
58      PLAYER_CAN_REPEAT           = 1 << 7,
59      PLAYER_CAN_LOOP             = 1 << 8,
60      PLAYER_CAN_SHUFFLE          = 1 << 9,
61      PLAYER_CAN_CONTROL_RATE     = 1 << 10,
62      PLAYER_CAN_PLAY_BACKWARDS   = 1 << 11
63 };
64
65 int PlayerStatusChangedEmit     ( intf_thread_t * );
66 int PlayerCapsChangedEmit ( intf_thread_t * );
67 int PlayerMetadataChangedEmit( intf_thread_t*, input_item_t* );
68 int TrackChangedEmit      ( intf_thread_t *, input_item_t * );
69 int SeekedEmit( intf_thread_t * );
70
71 int PlayerPropertiesChangedEmit( intf_thread_t *, vlc_dictionary_t * );
72
73 void UpdatePlayerCaps( intf_thread_t * );
74
75 #endif /* include-guard */