2 * Devious: UPNP Control Point for Maemo 5
4 * Copyright (C) 2009 Kyle Cronan
6 * Author: Kyle Cronan <kyle@pbx.org>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; version 3 of the License, or (at your option)
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16 * Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this library; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef INCLUDED_DEVIOUS_H
25 #define INCLUDED_DEVIOUS_H 1
27 #define APPLICATION_NAME "Devious"
28 #define PLAY_WINDOW_TITLE "Now playing"
29 #define CHOOSE_TARGET "Choose target"
31 #define MP_ICON_PATH "/usr/share/themes/default/mediaplayer/"
33 #define ICON_XALIGN 0.6
34 #define PLAY_WINDOW_IMAGE_SIZE 295
35 #define MEDIA_RENDERER "urn:schemas-upnp-org:device:MediaRenderer:*"
36 #define MEDIA_SERVER "urn:schemas-upnp-org:device:MediaServer:*"
37 #define CONTENT_DIR "urn:schemas-upnp-org:service:ContentDirectory"
38 #define CONNECTION_MANAGER "urn:schemas-upnp-org:service:ConnectionManager"
39 #define AV_TRANSPORT "urn:schemas-upnp-org:service:AVTransport"
40 #define ALBUM_ART "albumArtURI"
44 GHashTable *renderers;
46 GtkListStore *renderer_list;
47 GtkListStore *server_list;
48 struct application *app;
54 HildonPickerButton *renderer_picker;
55 GUPnPDIDLLiteParser *didl_parser;
59 GtkTreeRowReference *row;
60 GUPnPDeviceProxy *proxy;
63 struct proxy_set *set;
67 GUPnPServiceProxy *content_dir;
69 guint32 starting_index;
71 struct proxy_set *set;
74 struct selection_data {
75 GtkTreeRowReference *row;
79 struct proxy_set *set;
83 GdkPixbuf *pixbufs[2];
87 void (*callback)(GtkWidget *, gpointer);
101 void browse(GUPnPServiceProxy *content_dir, const char *container_id,
102 guint32 starting_index, guint32 requested_count,
103 GtkListStore *list, struct proxy_set *proxy_set);
105 void set_panarea_padding(GtkWidget *child, gpointer data);
107 GtkWidget *new_selector(GtkListStore *list);
109 void content_select(HildonTouchSelector *selector, gint column, gpointer data);
111 GtkWidget *content_window(struct proxy *server, char *title,
112 GtkListStore **list);
114 void server_select(HildonTouchSelector *selector, gint column, gpointer data);
116 GtkWidget *main_window(HildonProgram *program, struct proxy_set *proxy_set);
118 void add_renderer(GUPnPDeviceProxy *proxy, struct proxy_set *proxy_set);
120 void add_server(GUPnPDeviceProxy *proxy, struct proxy_set *proxy_set);
122 void remove_server(GUPnPDeviceProxy *proxy, struct proxy_set *proxy_set);
124 void device_proxy_available(GUPnPControlPoint *cp,
125 GUPnPDeviceProxy *proxy, gpointer user_data);
127 void init_upnp(struct proxy_set *proxy_set);
129 #endif /* INCLUDED_DEVIOUS_H */