1 /*
2  * Copyright (C) 2007 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
3  *
4  * Authors: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef __GUPNP_UNIVERSAL_CP_ICONS_H__
22 #define __GUPNP_UNIVERSAL_CP_ICONS_H__
23 
24 #include <libgupnp/gupnp-control-point.h>
25 #include <gtk/gtk.h>
26 
27 typedef enum
28 {
29         ICON_FIRST = -1,
30         ICON_DEVICE,
31         ICON_SERVICE,
32         ICON_VARIABLE,
33         ICON_ACTION_ARG_IN,
34         ICON_ACTION_ARG_OUT,
35         ICON_MEDIA_RENDERER,
36         ICON_MISSING,
37         ICON_NETWORK,
38         ICON_ACTION,
39         ICON_VARIABLES,
40         ICON_FILE,
41         ICON_CONTAINER,
42         ICON_AUDIO_ITEM,
43         ICON_VIDEO_ITEM,
44         ICON_IMAGE_ITEM,
45         ICON_TEXT_ITEM,
46         ICON_LAST
47 } IconID;
48 
49 typedef void (* DeviceIconAvailableCallback) (GUPnPDeviceInfo *info,
50                                               GdkPixbuf       *icon);
51 
52 void
53 schedule_icon_update   (GUPnPDeviceInfo            *info,
54                         DeviceIconAvailableCallback callback);
55 
56 void
57 unschedule_icon_update (GUPnPDeviceInfo *info);
58 
59 GdkPixbuf *
60 get_icon_by_id         (IconID icon_id);
61 
62 GdkPixbuf *
63 load_pixbuf_file       (const char *file_name);
64 
65 void
66 init_icons             (void);
67 
68 void
69 deinit_icons           (void);
70 
71 #endif /* __GUPNP_UNIVERSAL_CP_ICONS_H__ */
72