Mercurial > pidgin-audacious
comparison pidgin-audacious.h @ 22:fbad40babe88
build system update:
- ported Makefile.in from pidgin-twitter.
- ported autogen.sh from pidgin-twitter.
- moved some declarations and definitions to pidgin-audacious.h
- updated configure.in to go along with new Makefile.
- removed aclocal.m4 from version control.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 06 Oct 2008 18:18:06 +0900 |
parents | |
children | dffc9604a9fb |
comparison
equal
deleted
inserted
replaced
21:83002f858ee9 | 22:fbad40babe88 |
---|---|
1 #ifndef _PIDGIN_AUDACIOUS_H_ | |
2 #define _PIDGIN_AUDACIOUS_H_ | |
3 | |
4 #include <stdio.h> | |
5 #include <stdlib.h> | |
6 #include <string.h> | |
7 #include <glib.h> | |
8 #include <dbus/dbus.h> | |
9 #include <dbus/dbus-glib.h> | |
10 | |
11 #include "gtkplugin.h" | |
12 #include "util.h" | |
13 #include "debug.h" | |
14 #include "connection.h" | |
15 #include "version.h" | |
16 #include "cmds.h" | |
17 #include "savedstatuses.h" | |
18 | |
19 #define PIDGINAUD_PLUGIN_ID "pidgin_audacious" | |
20 #define PLUGIN_NAME "Pidgin-Audacious" | |
21 | |
22 /* preferences */ | |
23 #define OPT_PIDGINAUD "/plugins/pidgin_audacious" | |
24 #define OPT_PROCESS_STATUS OPT_PIDGINAUD "/process_status" | |
25 #define OPT_PROCESS_USERINFO OPT_PIDGINAUD "/process_userinfo" | |
26 #define OPT_SONG_TEMPLATE OPT_PIDGINAUD "/song_template" | |
27 #define OPT_PASTE_TEMPLATE OPT_PIDGINAUD "/paste_template" | |
28 #define OPT_LOG_OUTPUT OPT_PIDGINAUD "/log_output" | |
29 #define OPT_PLAYER OPT_PIDGINAUD "/player" | |
30 | |
31 /* templates */ | |
32 #define TITLE "%title" | |
33 #define ARTIST "%artist" | |
34 #define ALBUM "%album" | |
35 #define GENRE "%genre" | |
36 #define DEFAULT_SONG_TEMPLATE "%title - %artist" | |
37 #define DEFAULT_PLAYER "audacious" | |
38 #define SONG_TOKEN "%song" | |
39 #define NO_SONG_MESSAGE "No song being played." | |
40 | |
41 /* constants */ | |
42 #define DBUS_TIMEOUT 1000 | |
43 #define PLAYING 0 | |
44 #define PAUSED 1 | |
45 #define STOPPED 2 | |
46 | |
47 /* custom data type */ | |
48 typedef struct song_tuple { | |
49 gchar *title; | |
50 gchar *artist; | |
51 gchar *album; | |
52 gchar *genre; | |
53 } song_tuple; | |
54 | |
55 /* mpris data containers */ | |
56 #define DBUS_TYPE_MPRIS_STATUS (dbus_g_type_get_struct ("GValueArray", G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INVALID)) | |
57 | |
58 #define DBUS_TYPE_G_STRING_VALUE_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)) | |
59 | |
60 /* debug macros */ | |
61 #define aud_debug(fmt, ...) do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_INFO, PLUGIN_NAME, "%s():%4d: " fmt, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0); | |
62 | |
63 #define aud_error(fmt, ...) do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_ERROR, PLUGIN_NAME, "%s():%4d: " fmt, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0); | |
64 | |
65 #endif |