~serge-hallyn/ubuntu/precise/rhythmbox/rhythmbox-sort

« back to all changes in this revision

Viewing changes to remote/rb-remote-client-proxy.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-12-02 19:23:18 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051202192318-7ayjionj59dq1wk4
Tags: 0.9.2-0ubuntu3
* debian/control.in:
  - Build-Depends on libmusicbrainz4-dev so rhythmbox does the CD 
    query on internet (Ubuntu: #20363).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * arch-tag: Implementation of Rhythmbox remote client proxy interface
 
3
 *
 
4
 * Copyright (C) 2004 Colin Walters <walters@verbum.org>
 
5
 *
 
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.
 
10
 *
 
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
 * General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Library 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.
 
20
 */
 
21
 
 
22
#include <config.h>
 
23
#include "rb-remote-client-proxy.h"
 
24
 
 
25
static void rb_remote_client_proxy_base_init (gpointer g_class);
 
26
 
 
27
GType
 
28
rb_remote_client_proxy_get_type (void)
 
29
{
 
30
        static GType type = 0;
 
31
 
 
32
        if (!type) {
 
33
                static const GTypeInfo rb_remote_client_proxy_info = {
 
34
                        sizeof (RBRemoteClientProxyIface), /* class_size */
 
35
                        rb_remote_client_proxy_base_init,   /* base_init */
 
36
                        NULL,           /* base_finalize */
 
37
                        NULL,
 
38
                        NULL,           /* class_finalize */
 
39
                        NULL,           /* class_data */
 
40
                        0,
 
41
                        0,              /* n_preallocs */
 
42
                        NULL
 
43
                };
 
44
                
 
45
                type = g_type_register_static (G_TYPE_INTERFACE, "RBRemoteClientProxy",
 
46
                                               &rb_remote_client_proxy_info, 0);
 
47
 
 
48
                g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
 
49
        }
 
50
 
 
51
        return type;
 
52
}
 
53
 
 
54
static void
 
55
rb_remote_client_proxy_base_init (gpointer g_class)
 
56
{
 
57
        static gboolean initialized = FALSE;
 
58
        
 
59
        if (!initialized) {
 
60
                initialized = TRUE;
 
61
        }
 
62
}
 
63
 
 
64
void
 
65
rb_remote_client_proxy_handle_uri (RBRemoteClientProxy *proxy, const char *uri)
 
66
{
 
67
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->handle_uri) (proxy, uri);
 
68
}
 
69
 
 
70
void
 
71
rb_remote_client_proxy_add_to_library (RBRemoteClientProxy *proxy, const char *uri)
 
72
{
 
73
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->add_to_library) (proxy, uri);
 
74
}
 
75
 
 
76
void
 
77
rb_remote_client_proxy_play_uri (RBRemoteClientProxy *proxy, const char *uri)
 
78
{
 
79
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->play_uri) (proxy, uri);
 
80
}
 
81
 
 
82
RBRemoteSong *
 
83
rb_remote_client_proxy_get_playing_song (RBRemoteClientProxy *proxy)
 
84
{
 
85
        return (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->get_playing_song) (proxy);
 
86
}
 
87
 
 
88
void
 
89
rb_remote_client_proxy_grab_focus (RBRemoteClientProxy *proxy)
 
90
{
 
91
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->grab_focus) (proxy);
 
92
}
 
93
 
 
94
void
 
95
rb_remote_client_proxy_toggle_visibility (RBRemoteClientProxy *proxy)
 
96
{
 
97
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->toggle_visibility) (proxy);
 
98
}
 
99
 
 
100
void
 
101
rb_remote_client_proxy_set_visibility (RBRemoteClientProxy *proxy, gboolean visible)
 
102
{
 
103
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->set_visibility) (proxy, visible);
 
104
}
 
105
 
 
106
gboolean
 
107
rb_remote_client_proxy_get_visibility (RBRemoteClientProxy *proxy)
 
108
{
 
109
        return (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->get_visibility) (proxy);
 
110
}
 
111
 
 
112
void
 
113
rb_remote_client_proxy_toggle_shuffle (RBRemoteClientProxy *proxy)
 
114
{
 
115
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->toggle_shuffle) (proxy);
 
116
}
 
117
 
 
118
void
 
119
rb_remote_client_proxy_toggle_repeat (RBRemoteClientProxy *proxy)
 
120
{
 
121
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->toggle_repeat) (proxy);
 
122
}
 
123
 
 
124
void
 
125
rb_remote_client_proxy_toggle_playing (RBRemoteClientProxy *proxy)
 
126
{
 
127
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->toggle_playing) (proxy);
 
128
}
 
129
 
 
130
void
 
131
rb_remote_client_proxy_play (RBRemoteClientProxy *proxy)
 
132
{
 
133
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->play) (proxy);
 
134
}
 
135
 
 
136
void
 
137
rb_remote_client_proxy_pause (RBRemoteClientProxy *proxy)
 
138
{
 
139
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->pause) (proxy);
 
140
}
 
141
 
 
142
long
 
143
rb_remote_client_proxy_get_playing_time (RBRemoteClientProxy *proxy)
 
144
{
 
145
        return (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->get_playing_time) (proxy);
 
146
}
 
147
 
 
148
void
 
149
rb_remote_client_proxy_set_playing_time (RBRemoteClientProxy *proxy, long time)
 
150
{
 
151
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->set_playing_time) (proxy, time);
 
152
}
 
153
 
 
154
void
 
155
rb_remote_client_proxy_seek (RBRemoteClientProxy *proxy, long offset)
 
156
{
 
157
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->seek) (proxy, offset);
 
158
}
 
159
 
 
160
void
 
161
rb_remote_client_proxy_set_rating (RBRemoteClientProxy *proxy, double rating)
 
162
{
 
163
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->set_rating) (proxy, rating);
 
164
}
 
165
 
 
166
void
 
167
rb_remote_client_proxy_jump_next (RBRemoteClientProxy *proxy)
 
168
{
 
169
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->jump_next) (proxy);
 
170
}
 
171
 
 
172
void
 
173
rb_remote_client_proxy_jump_previous (RBRemoteClientProxy *proxy)
 
174
{
 
175
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->jump_previous) (proxy);
 
176
}
 
177
 
 
178
void
 
179
rb_remote_client_proxy_quit (RBRemoteClientProxy *proxy)
 
180
{
 
181
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->quit) (proxy);
 
182
}
 
183
 
 
184
void
 
185
rb_remote_client_proxy_set_volume (RBRemoteClientProxy *proxy, float volume)
 
186
{
 
187
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->set_volume) (proxy, volume);
 
188
}
 
189
 
 
190
float
 
191
rb_remote_client_proxy_get_volume (RBRemoteClientProxy *proxy)
 
192
{
 
193
        return (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->get_volume) (proxy);
 
194
}
 
195
 
 
196
void
 
197
rb_remote_client_proxy_toggle_mute (RBRemoteClientProxy *proxy)
 
198
{
 
199
        (* RB_REMOTE_CLIENT_PROXY_GET_IFACE (proxy)->toggle_mute) (proxy);
 
200
}