aboutsummaryrefslogtreecommitdiff
path: root/src/mpris-controller-v2.c
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2010-07-12 17:45:04 +0200
committerSebastien Bacher <seb128@ubuntu.com>2010-07-12 17:45:04 +0200
commitf6ffb190261dfdbbf55e90b63c1cd06f03037e35 (patch)
treef34ba1947d158c3c38de6556f4049c518dc58c43 /src/mpris-controller-v2.c
parent964106d9c8c140d9c27a22aca8078dfdab57c5e9 (diff)
parentd8253fc0cfe667316e2e5f033bcbfba4c3044297 (diff)
downloadayatana-indicator-sound-f6ffb190261dfdbbf55e90b63c1cd06f03037e35.tar.gz
ayatana-indicator-sound-f6ffb190261dfdbbf55e90b63c1cd06f03037e35.tar.bz2
ayatana-indicator-sound-f6ffb190261dfdbbf55e90b63c1cd06f03037e35.zip
Import upstream version 0.3.6
Diffstat (limited to 'src/mpris-controller-v2.c')
-rw-r--r--src/mpris-controller-v2.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/mpris-controller-v2.c b/src/mpris-controller-v2.c
index 4a48165..40fe3da 100644
--- a/src/mpris-controller-v2.c
+++ b/src/mpris-controller-v2.c
@@ -23,8 +23,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <glib-object.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
#include <stdlib.h>
#include <string.h>
@@ -64,7 +62,6 @@ typedef struct _PlayerControllerClass PlayerControllerClass;
struct _MprisController {
GObject parent_instance;
MprisControllerPrivate * priv;
- DBusGProxy* mpris_player;
};
struct _MprisControllerClass {
@@ -89,24 +86,22 @@ enum {
MPRIS_CONTROLLER_V2_DUMMY_PROPERTY
};
GType player_controller_get_type (void);
-MprisController* mpris_controller_new (const char* name, PlayerController* controller, const char* mpris_interface);
-MprisController* mpris_controller_construct (GType object_type, const char* name, PlayerController* controller, const char* mpris_interface);
-MprisControllerV2* mpris_controller_v2_new (const char* name, PlayerController* controller);
-MprisControllerV2* mpris_controller_v2_construct (GType object_type, const char* name, PlayerController* controller);
+MprisControllerV2* mpris_controller_v2_new (PlayerController* ctrl, const char* inter);
+MprisControllerV2* mpris_controller_v2_construct (GType object_type, PlayerController* ctrl, const char* inter);
-MprisControllerV2* mpris_controller_v2_construct (GType object_type, const char* name, PlayerController* controller) {
+MprisControllerV2* mpris_controller_v2_construct (GType object_type, PlayerController* ctrl, const char* inter) {
MprisControllerV2 * self;
- g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (controller != NULL, NULL);
- self = (MprisControllerV2*) mpris_controller_construct (object_type, name, controller, "org.mpris.MediaPlayer.Player");
+ g_return_val_if_fail (ctrl != NULL, NULL);
+ g_return_val_if_fail (inter != NULL, NULL);
+ self = (MprisControllerV2*) g_object_new (object_type, "owner", ctrl, "mpris-interface", inter, NULL);
return self;
}
-MprisControllerV2* mpris_controller_v2_new (const char* name, PlayerController* controller) {
- return mpris_controller_v2_construct (TYPE_MPRIS_CONTROLLER_V2, name, controller);
+MprisControllerV2* mpris_controller_v2_new (PlayerController* ctrl, const char* inter) {
+ return mpris_controller_v2_construct (TYPE_MPRIS_CONTROLLER_V2, ctrl, inter);
}