Mercurial > audlegacy
comparison src/libaudclient/audctrl.c @ 2731:f4a5f8fa3836 trunk
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
Fixed audtool by moving all the DBus methods defined in objects.xml to a common interface; this will be decentralized for MPRIS.
Modified the Makefile so that libaudclient is built after audacious to eliminates a build warning.
| author | magma |
|---|---|
| date | Fri, 11 May 2007 01:42:32 -0700 |
| parents | 8f7da5257692 |
| children | cf080b11c3fa |
comparison
equal
deleted
inserted
replaced
| 2730:596abc2be8f0 | 2731:f4a5f8fa3836 |
|---|---|
| 43 | 43 |
| 44 void audacious_remote_playlist_delete(DBusGProxy *proxy, gint pos) { | 44 void audacious_remote_playlist_delete(DBusGProxy *proxy, gint pos) { |
| 45 } | 45 } |
| 46 | 46 |
| 47 void audacious_remote_play(DBusGProxy *proxy) { | 47 void audacious_remote_play(DBusGProxy *proxy) { |
| 48 org_atheme_audacious_playback_play(proxy, &error); | 48 org_atheme_audacious_play(proxy, &error); |
| 49 g_error_free(error); | 49 g_clear_error(&error); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void audacious_remote_pause(DBusGProxy *proxy) { | 52 void audacious_remote_pause(DBusGProxy *proxy) { |
| 53 org_atheme_audacious_playback_pause(proxy, &error); | 53 org_atheme_audacious_pause(proxy, &error); |
| 54 g_error_free(error); | 54 g_clear_error(&error); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void audacious_remote_stop(DBusGProxy *proxy) { | 57 void audacious_remote_stop(DBusGProxy *proxy) { |
| 58 org_atheme_audacious_playback_stop(proxy, &error); | 58 org_atheme_audacious_stop(proxy, &error); |
| 59 g_error_free(error); | 59 g_clear_error(&error); |
| 60 } | 60 } |
| 61 | 61 |
| 62 gboolean audacious_remote_is_playing(DBusGProxy *proxy) { | 62 gboolean audacious_remote_is_playing(DBusGProxy *proxy) { |
| 63 gboolean is_playing; | 63 gboolean is_playing; |
| 64 org_atheme_audacious_playback_playing(proxy, &is_playing, &error); | 64 org_atheme_audacious_playing(proxy, &is_playing, &error); |
| 65 g_error_free(error); | 65 g_clear_error(&error); |
| 66 return is_playing; | 66 return is_playing; |
| 67 } | 67 } |
| 68 | 68 |
| 69 gboolean audacious_remote_is_paused(DBusGProxy *proxy) { | 69 gboolean audacious_remote_is_paused(DBusGProxy *proxy) { |
| 70 gboolean is_paused; | 70 gboolean is_paused; |
| 71 org_atheme_audacious_playback_paused(proxy, &is_paused, &error); | 71 org_atheme_audacious_paused(proxy, &is_paused, &error); |
| 72 g_error_free(error); | 72 g_clear_error(&error); |
| 73 return is_paused; | 73 return is_paused; |
| 74 } | 74 } |
| 75 | 75 |
| 76 gint audacious_remote_get_playlist_pos(DBusGProxy *proxy) { | 76 gint audacious_remote_get_playlist_pos(DBusGProxy *proxy) { |
| 77 gint pos; | 77 gint pos; |
| 78 org_atheme_audacious_playlist_position(proxy, &pos, &error); | 78 org_atheme_audacious_position(proxy, &pos, &error); |
| 79 g_error_free(error); | 79 g_clear_error(&error); |
| 80 return pos; | 80 return pos; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void audacious_remote_set_playlist_pos(DBusGProxy *proxy, gint pos) { | 83 void audacious_remote_set_playlist_pos(DBusGProxy *proxy, gint pos) { |
| 84 } | 84 } |
| 85 | 85 |
| 86 gint audacious_remote_get_playlist_length(DBusGProxy *proxy) { | 86 gint audacious_remote_get_playlist_length(DBusGProxy *proxy) { |
| 87 gint len; | 87 gint len; |
| 88 org_atheme_audacious_playlist_length(proxy, &len, &error); | 88 org_atheme_audacious_length(proxy, &len, &error); |
| 89 g_error_free(error); | 89 g_clear_error(&error); |
| 90 return len; | 90 return len; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void audacious_remote_playlist_clear(DBusGProxy *proxy) { | 93 void audacious_remote_playlist_clear(DBusGProxy *proxy) { |
| 94 org_atheme_audacious_playlist_clear(proxy, &error); | 94 org_atheme_audacious_clear(proxy, &error); |
| 95 g_error_free(error); | 95 g_clear_error(&error); |
| 96 } | 96 } |
| 97 | 97 |
| 98 gint audacious_remote_get_output_time(DBusGProxy *proxy) { | 98 gint audacious_remote_get_output_time(DBusGProxy *proxy) { |
| 99 gint time; | 99 gint time; |
| 100 org_atheme_audacious_playback_time(proxy, &time, &error); | 100 org_atheme_audacious_time(proxy, &time, &error); |
| 101 g_error_free(error); | 101 g_clear_error(&error); |
| 102 return time; | 102 return time; |
| 103 } | 103 } |
| 104 | 104 |
| 105 void audacious_remote_jump_to_time(DBusGProxy *proxy, gint pos) { | 105 void audacious_remote_jump_to_time(DBusGProxy *proxy, gint pos) { |
| 106 } | 106 } |
| 112 * @vr: Pointer to integer containing the right channel's volume. | 112 * @vr: Pointer to integer containing the right channel's volume. |
| 113 * | 113 * |
| 114 * Queries audacious about the current volume. | 114 * Queries audacious about the current volume. |
| 115 **/ | 115 **/ |
| 116 void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) { | 116 void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) { |
| 117 org_atheme_audacious_playback_volume(proxy, vl, vr, &error); | 117 org_atheme_audacious_volume(proxy, vl, vr, &error); |
| 118 g_error_free(error); | 118 g_clear_error(&error); |
| 119 } | 119 } |
| 120 | 120 |
| 121 /** | 121 /** |
| 122 * audacious_remote_get_main_volume: | 122 * audacious_remote_get_main_volume: |
| 123 * @proxy: DBus proxy for audacious | 123 * @proxy: DBus proxy for audacious |
| 133 | 133 |
| 134 return (vl > vr) ? vl : vr; | 134 return (vl > vr) ? vl : vr; |
| 135 } | 135 } |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * audacious_remote_get_balance: | |
| 139 * @proxy: DBus proxy for audacious | |
| 140 * | |
| 141 * Queries audacious about the current balance. | |
| 142 * | |
| 143 * Return value: The current balance. | |
| 144 **/ | |
| 145 gint audacious_remote_get_balance(DBusGProxy *proxy) { | |
| 146 gint balance; | |
| 147 org_atheme_audacious_balance(proxy, &balance, &error); | |
| 148 g_clear_error(&error); | |
| 149 return balance; | |
| 150 } | |
| 151 | |
| 152 /** | |
| 138 * audacious_remote_set_volume: | 153 * audacious_remote_set_volume: |
| 139 * @proxy: DBus proxy for audacious | 154 * @proxy: DBus proxy for audacious |
| 140 * @vl: The volume for the left channel. | 155 * @vl: The volume for the left channel. |
| 141 * @vr: The volume for the right channel. | 156 * @vr: The volume for the right channel. |
| 142 * | 157 * |
| 143 * Sets the volume for the left and right channels in Audacious. | 158 * Sets the volume for the left and right channels in Audacious. |
| 144 **/ | 159 **/ |
| 145 void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) { | 160 void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) { |
| 146 org_atheme_audacious_playback_set_volume(proxy, vl, vr, &error); | 161 org_atheme_audacious_set_volume(proxy, vl, vr, &error); |
| 147 g_error_free(error); | 162 g_clear_error(&error); |
| 148 } | 163 } |
| 149 | 164 |
| 150 | 165 |
| 151 /** | 166 /** |
| 152 * audacious_remote_set_main_volume: | 167 * audacious_remote_set_main_volume: |
| 169 } else | 184 } else |
| 170 vl = vr = v; | 185 vl = vr = v; |
| 171 audacious_remote_set_volume(proxy, vl, vr); | 186 audacious_remote_set_volume(proxy, vl, vr); |
| 172 } | 187 } |
| 173 | 188 |
| 174 /** | 189 void audacious_remote_set_balance(DBusGProxy *proxy, gint b) { |
| 175 * audacious_remote_get_balance: | 190 gint v, vl, vr; |
| 176 * @proxy: DBus proxy for audacious | 191 |
| 177 * | 192 if (b < -100) |
| 178 * Queries audacious about the current balance. | 193 b = -100; |
| 179 * | 194 if (b > 100) |
| 180 * Return value: The current balance. | 195 b = 100; |
| 181 **/ | 196 |
| 182 gint audacious_remote_get_balance(DBusGProxy *proxy) { | 197 v = audacious_remote_get_main_volume(proxy); |
| 183 gint balance; | 198 |
| 184 org_atheme_audacious_playback_balance(proxy, &balance, &error); | 199 if (b < 0) { |
| 185 g_error_free(error); | 200 vl = v; |
| 186 return balance; | 201 vr = (v * (100 - abs(b))) / 100; |
| 187 } | 202 } else if (b > 0) { |
| 203 vl = (v * (100 - b)) / 100; | |
| 204 vr = v; | |
| 205 } else | |
| 206 vl = vr = v; | |
| 207 audacious_remote_set_volume(proxy, vl, vr); | |
| 208 } | |
| 209 | |
| 210 gchar *audacious_remote_get_skin(DBusGProxy *proxy) { | |
| 211 } | |
| 212 | |
| 213 void audacious_remote_set_skin(DBusGProxy *proxy, gchar *skinfile) { | |
| 214 } | |
| 215 | |
| 216 gchar *audacious_remote_get_playlist_file(DBusGProxy *proxy, gint pos) { | |
| 217 } | |
| 218 | |
| 219 gchar *audacious_remote_get_playlist_title(DBusGProxy *proxy, gint pos) { | |
| 220 } | |
| 221 | |
| 222 gint audacious_remote_get_playlist_time(DBusGProxy *proxy, gint pos) { | |
| 223 } | |
| 224 | |
| 225 void audacious_remote_get_info(DBusGProxy *proxy, gint *rate, gint *freq, | |
| 226 gint *nch) { | |
| 227 } | |
| 228 | |
| 229 void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show) { | |
| 230 } | |
| 231 | |
| 232 void audacious_remote_pl_win_toggle(DBusGProxy *proxy, gboolean show) { | |
| 233 } | |
| 234 | |
| 235 void audacious_remote_eq_win_toggle(DBusGProxy *proxy, gboolean show) { | |
| 236 } | |
| 237 | |
| 238 gboolean audacious_remote_is_main_win(DBusGProxy *proxy) { | |
| 239 } | |
| 240 | |
| 241 gboolean audacious_remote_is_pl_win(DBusGProxy *proxy) { | |
| 242 } | |
| 243 | |
| 244 gboolean audacious_remote_is_eq_win(DBusGProxy *proxy) { | |
| 245 } | |
| 246 | |
| 247 void audacious_remote_show_prefs_box(DBusGProxy *proxy) { | |
| 248 } | |
| 249 | |
| 250 void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop) { | |
| 251 } | |
| 252 | |
| 253 void audacious_remote_eject(DBusGProxy *proxy) { | |
| 254 } | |
| 255 | |
| 256 void audacious_remote_playlist_prev(DBusGProxy *proxy) { | |
| 257 } | |
| 258 | |
| 259 void audacious_remote_playlist_next(DBusGProxy *proxy) { | |
| 260 } | |
| 261 | |
| 188 | 262 |
| 189 void audacious_remote_playlist_add_url_string(DBusGProxy *proxy, | 263 void audacious_remote_playlist_add_url_string(DBusGProxy *proxy, |
| 190 gchar *string) { | 264 gchar *string) { |
| 191 org_atheme_audacious_playlist_add_url(proxy, string, &error); | 265 org_atheme_audacious_add_url(proxy, string, &error); |
| 192 g_error_free(error); | 266 g_clear_error(&error); |
| 193 } | 267 } |
| 268 | |
| 269 gboolean audacious_remote_is_running(DBusGProxy *proxy) { | |
| 270 } | |
| 271 | |
| 272 void audacious_remote_toggle_repeat(DBusGProxy *proxy) { | |
| 273 } | |
| 274 | |
| 275 void audacious_remote_toggle_shuffle(DBusGProxy *proxy) { | |
| 276 } | |
| 277 | |
| 278 gboolean audacious_remote_is_repeat(DBusGProxy *proxy) { | |
| 279 } | |
| 280 | |
| 281 gboolean audacious_remote_is_shuffle(DBusGProxy *proxy) { | |
| 282 } | |
| 283 | |
| 284 void audacious_remote_get_eq(DBusGProxy *proxy, gfloat *preamp, | |
| 285 gfloat **bands) { | |
| 286 } | |
| 287 | |
| 288 gfloat audacious_remote_get_eq_preamp(DBusGProxy *proxy) { | |
| 289 } | |
| 290 | |
| 291 gfloat audacious_remote_get_eq_band(DBusGProxy *proxy, gint band) { | |
| 292 } | |
| 293 | |
| 294 void audacious_remote_set_eq(DBusGProxy *proxy, gfloat preamp, | |
| 295 gfloat *bands) { | |
| 296 } | |
| 297 | |
| 298 void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gfloat preamp) { | |
| 299 } | |
| 300 | |
| 301 void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band, | |
| 302 gfloat value) { | |
| 303 } | |
| 304 | |
| 305 void audacious_remote_quit(DBusGProxy *proxy) { | |
| 306 } | |
| 307 | |
| 308 void audacious_remote_play_pause(DBusGProxy *proxy) { | |
| 309 } | |
| 310 | |
| 311 void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy, | |
| 312 gchar *string, gint pos) { | |
| 313 } | |
| 314 | |
| 315 void audacious_remote_playqueue_add(DBusGProxy *proxy, gint pos) { | |
| 316 } | |
| 317 | |
| 318 void audacious_remote_playqueue_remove(DBusGProxy *proxy, gint pos) { | |
| 319 } | |
| 320 | |
| 321 gint audacious_remote_get_playqueue_length(DBusGProxy *proxy) { | |
| 322 } | |
| 323 | |
| 324 void audacious_remote_toggle_advance(DBusGProxy *proxy) { | |
| 325 } | |
| 326 | |
| 327 gboolean audacious_remote_is_advance(DBusGProxy *proxy) { | |
| 328 } | |
| 329 | |
| 330 void audacious_remote_activate(DBusGProxy *proxy) { | |
| 331 } | |
| 332 | |
| 333 void audacious_remote_show_jtf_box(DBusGProxy *proxy) { | |
| 334 } | |
| 335 | |
| 336 void audacious_remote_playqueue_clear(DBusGProxy *proxy) { | |
| 337 } | |
| 338 | |
| 339 gboolean audacious_remote_playqueue_is_queued(DBusGProxy *proxy, gint pos) { | |
| 340 } | |
| 341 | |
| 342 gint audacious_remote_get_playqueue_position(DBusGProxy *proxy, gint pos) { | |
| 343 } | |
| 344 | |
| 345 gint audacious_remote_get_playqueue_queue_position(DBusGProxy *proxy, | |
| 346 gint pos) { | |
| 347 } | |
| 348 | |
| 349 void audacious_remote_playlist_enqueue_to_temp(DBusGProxy *proxy, | |
| 350 gchar *string) { | |
| 351 } | |
| 352 | |
| 353 gchar *audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field, | |
| 354 gint pos) { | |
| 355 } |
