2
* arch-tag: Header for Rhythmbox remote proxy interface
4
* Copyright (C) 2004 Colin Walters <walters@verbum.org>
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
22
#ifndef __RB_REMOTE_PROXY_H__
23
#define __RB_REMOTE_PROXY_H__
25
#include <glib-object.h>
26
#include "rb-remote-common.h"
30
#define RB_TYPE_REMOTE_PROXY (rb_remote_proxy_get_type ())
31
#define RB_REMOTE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RB_TYPE_REMOTE_PROXY, RBRemoteProxy))
32
#define RB_IS_REMOTE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RB_TYPE_REMOTE_PROXY))
33
#define RB_REMOTE_PROXY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RB_TYPE_REMOTE_PROXY, RBRemoteProxyIface))
35
typedef struct _RBRemoteProxy RBRemoteProxy; /* Dummy typedef */
36
typedef struct _RBRemoteProxyIface RBRemoteProxyIface;
43
struct _RBRemoteProxyIface
45
GTypeInterface g_iface;
48
void (*song_changed) (RBRemoteProxy *proxy,
49
const RBRemoteSong *song);
50
void (*visibility_changed) (RBRemoteProxy *proxy,
54
void (*load_uri) (RBRemoteProxy *proxy, const char *uri, gboolean play);
55
void (*select_uri) (RBRemoteProxy *proxy, const char *uri);
56
void (*play_uri) (RBRemoteProxy *proxy, const char *uri);
58
void (*grab_focus) (RBRemoteProxy *proxy);
59
void (*set_visibility) (RBRemoteProxy *proxy, gboolean visible);
60
gboolean (*get_visibility) (RBRemoteProxy *proxy);
62
gboolean (*get_shuffle) (RBRemoteProxy *proxy);
63
void (*set_shuffle) (RBRemoteProxy *proxy, gboolean shuffle);
64
gboolean (*get_repeat) (RBRemoteProxy *proxy);
65
void (*set_repeat) (RBRemoteProxy *proxy, gboolean repeat);
67
void (*play) (RBRemoteProxy *proxy);
68
void (*pause) (RBRemoteProxy *proxy);
69
gboolean (*playing) (RBRemoteProxy *proxy);
71
long (*get_playing_time) (RBRemoteProxy *proxy);
72
void (*set_playing_time) (RBRemoteProxy *proxy, long time);
73
void (*seek) (RBRemoteProxy *proxy, long offset);
75
gchar* (*get_playing_uri) (RBRemoteProxy *proxy);
76
gboolean (*get_song_info) (RBRemoteProxy *proxy, const gchar *uri, RBRemoteSong *song);
77
void (*set_rating) (RBRemoteProxy *proxy, double rating);
79
void (*jump_next) (RBRemoteProxy *proxy);
80
void (*jump_previous) (RBRemoteProxy *proxy);
82
void (*toggle_mute) (RBRemoteProxy *proxy);
84
void (*quit) (RBRemoteProxy *proxy);
86
GParamSpec *(*find_player_property) (RBRemoteProxy *proxy, const gchar *property);
87
void (*player_notify_handler) (RBRemoteProxy *proxy, GCallback c_handler, gpointer gobject);
88
void (*get_player_property) (RBRemoteProxy *proxy, const gchar *property, GValue *value);
89
void (*set_player_property) (RBRemoteProxy *proxy, const gchar *property, GValue *value);
91
gchar* (*get_playing_source) (RBRemoteProxy *proxy);
95
GType rb_remote_proxy_get_type (void) G_GNUC_CONST;
97
void rb_remote_proxy_load_uri (RBRemoteProxy *proxy,
100
void rb_remote_proxy_select_uri (RBRemoteProxy *proxy,
102
void rb_remote_proxy_play_uri (RBRemoteProxy *proxy,
104
void rb_remote_proxy_grab_focus (RBRemoteProxy *proxy);
105
void rb_remote_proxy_set_visibility (RBRemoteProxy *proxy, gboolean visible);
106
gboolean rb_remote_proxy_get_visibility (RBRemoteProxy *proxy);
108
gboolean rb_remote_proxy_get_shuffle (RBRemoteProxy *proxy);
109
void rb_remote_proxy_set_shuffle (RBRemoteProxy *proxy, gboolean shuffle);
110
gboolean rb_remote_proxy_get_repeat (RBRemoteProxy *proxy);
111
void rb_remote_proxy_set_repeat (RBRemoteProxy *proxy, gboolean repeat);
113
void rb_remote_proxy_play (RBRemoteProxy *proxy);
114
void rb_remote_proxy_pause (RBRemoteProxy *proxy);
115
gboolean rb_remote_proxy_playing (RBRemoteProxy *proxy);
117
long rb_remote_proxy_get_playing_time (RBRemoteProxy *proxy);
118
void rb_remote_proxy_set_playing_time (RBRemoteProxy *proxy, long time);
119
void rb_remote_proxy_seek (RBRemoteProxy *proxy, long offset);
120
void rb_remote_proxy_set_rating (RBRemoteProxy *proxy, double rating);
122
gchar *rb_remote_proxy_get_playing_uri (RBRemoteProxy *proxy);
123
gboolean rb_remote_proxy_get_song_info (RBRemoteProxy *proxy, const gchar *uri, RBRemoteSong *song);
125
void rb_remote_proxy_jump_next (RBRemoteProxy *proxy);
126
void rb_remote_proxy_jump_previous (RBRemoteProxy *proxy);
128
void rb_remote_proxy_toggle_mute (RBRemoteProxy *proxy);
130
void rb_remote_proxy_quit (RBRemoteProxy *proxy);
132
GParamSpec *rb_remote_proxy_find_player_property (RBRemoteProxy *proxy, const gchar *property);
133
void rb_remote_proxy_player_notify_handler (RBRemoteProxy *proxy, GCallback c_handler, gpointer gobject);
134
void rb_remote_proxy_set_player_property (RBRemoteProxy *proxy, const gchar *property, GValue *value);
135
void rb_remote_proxy_get_player_property (RBRemoteProxy *proxy, const gchar *property, GValue *value);
137
gchar *rb_remote_proxy_get_playing_source (RBRemoteProxy *proxy);
141
#endif /* __RB_REMOTE_PROXY_H__ */