summaryrefslogtreecommitdiff
path: root/src/libplayback-wrapper.h
blob: 9a473feb183efbd796927b74c649b52b15a24947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef LIBPLAYBACKWRAPPER_H
#define LIBPLAYBACKWRAPPER_H

#include "resource-library.h"
#include "resource.h"
#include <libplayback/playback.h>

class LibPlaybackWrapper: public QObject, public ResourceLibrary
{
   Q_OBJECT
   Q_DISABLE_COPY( LibPlaybackWrapper );
private:
   DBusConnection *dbusConnection;
   pb_playback_t *libPlaybackHandle;
   Resource *resource;

public:
   LibPlaybackWrapper(Resource *resource);
   ~LibPlaybackWrapper();
   bool initialize();
   bool connectToServer();

   bool reserve();

   void stateChanged(enum pb_state_e newState);
   void hintReceived(const int allowedStates[]);
};

#endif