2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * @addtogroup IrrecoWebdbClient
27 * Header file of @ref IrrecoWebdbClient.
31 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
33 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
35 * Make sure that typedefs are available before we include anything elese.
37 * This makes sure that whatever other structures that depend on structures
38 * defined in this file will compile OK recardles of header inclusion order.
40 #ifndef __IRRECO_WEBDB_CLIENT_TYPEDEF__
41 #define __IRRECO_WEBDB_CLIENT_TYPEDEF__
42 typedef struct _IrrecoWebdbClient IrrecoWebdbClient
;
43 #endif /* __IRRECO_WEBDB_CLIENT_TYPEDEF__ */
47 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
49 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
50 #ifndef __IRRECO_WEBDB_CLIENT__
51 #define __IRRECO_WEBDB_CLIENT__
52 #include "irreco_webdb.h"
56 #include "irreco_webdb_conf.h"
57 #include "irreco_webdb_theme.h"
58 #include <libsoup/soup.h>
59 #include <libsoup/soup-xmlrpc-message.h>
60 #include "irreco_sha1.h"
62 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
64 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
66 struct _IrrecoWebdbClient
73 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
75 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
79 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
81 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
82 IrrecoWebdbClient
*irreco_webdb_client_new();
83 void irreco_webdb_client_free(IrrecoWebdbClient
*self
);
84 void irreco_webdb_client_get_error_msg(IrrecoWebdbClient
*self
, GString
*msg
);
85 gboolean
irreco_webdb_client_add_user(IrrecoWebdbClient
*self
,
89 gboolean
irreco_webdb_client_add_uber(IrrecoWebdbClient
*self
,
93 gboolean
irreco_webdb_client_upload_configuration(IrrecoWebdbClient
*self
,
95 const gchar
*category
,
96 const gchar
*file_hash
,
97 const gchar
*file_name
,
98 const gchar
*manufacturer
,
100 const gchar
*password
,
104 gboolean
irreco_webdb_client_sum(IrrecoWebdbClient
*self
,
108 gboolean
irreco_webdb_client_get_categories(IrrecoWebdbClient
*self
,
109 IrrecoStringTable
**category_list
);
111 gboolean
irreco_webdb_client_get_all_categories(IrrecoWebdbClient
*self
,
112 IrrecoStringTable
**category_list
);
114 gboolean
irreco_webdb_client_get_manufacturers(IrrecoWebdbClient
*self
,
115 const gchar
*category
,
116 IrrecoStringTable
**manufacturer_list
);
118 gboolean
irreco_webdb_client_get_all_manufacturers(IrrecoWebdbClient
*self
,
119 IrrecoStringTable
**manufacturer_list
);
121 gboolean
irreco_webdb_client_get_models(IrrecoWebdbClient
*self
,
122 const gchar
*category
,
123 const gchar
*manufacturer
,
124 IrrecoStringTable
**model_list
);
126 gboolean
irreco_webdb_client_get_configs(IrrecoWebdbClient
*self
,
127 const gchar
*category
,
128 const gchar
*manufacturer
,
130 IrrecoStringTable
**config_list
);
132 gboolean
irreco_webdb_client_get_configuration(IrrecoWebdbClient
*self
,
134 IrrecoWebdbConf
**configuration
);
136 gboolean
irreco_webdb_client_get_file(IrrecoWebdbClient
*self
,
137 const gchar
*file_hash
,
138 const gchar
*file_name
,
139 GString
**file_data
);
141 gboolean
irreco_webdb_client_get_user_exists(IrrecoWebdbClient
*self
,
142 const gchar
*name
, gboolean
*user_exists
);
144 gint
irreco_webdb_client_get_max_image_size(IrrecoWebdbClient
*self
);
146 gint
irreco_webdb_client_create_theme(IrrecoWebdbClient
*self
,
148 const gchar
*comment
,
149 const gchar
*preview_button
,
152 const gchar
*password
);
154 gboolean
irreco_webdb_client_set_theme_downloadable(IrrecoWebdbClient
*self
,
156 gboolean downloadable
,
158 const gchar
*password
);
160 gboolean
irreco_webdb_client_get_themes(IrrecoWebdbClient
*self
,
161 IrrecoStringTable
**theme_list
);
163 gboolean
irreco_webdb_client_get_theme_by_id(IrrecoWebdbClient
*self
,
165 IrrecoWebdbTheme
**theme
);
167 gboolean
irreco_webdb_client_get_theme_versions_by_name(IrrecoWebdbClient
*self
,
169 IrrecoStringTable
**theme_list
);
171 gchar
*irreco_webdb_client_get_theme_date_by_id(IrrecoWebdbClient
*self
,
174 gint
irreco_webdb_client_add_bg_to_theme(IrrecoWebdbClient
*self
,
176 const gchar
*image_hash
,
177 const gchar
*image_name
,
183 const gchar
*password
);
185 gboolean
irreco_webdb_client_get_backgrounds(IrrecoWebdbClient
*self
,
187 IrrecoStringTable
**bg_list
);
189 gboolean
irreco_webdb_client_get_bg_by_id(IrrecoWebdbClient
*self
,
191 const char *theme_bg_dir
);
193 gint
irreco_webdb_client_add_button_to_theme(IrrecoWebdbClient
*self
,
196 const gchar
*text_format_up
,
197 const gchar
*text_format_down
,
201 const gchar
*image_up_hash
,
202 const gchar
*image_up_name
,
203 const guchar
*image_up
,
205 const gchar
*image_down_hash
,
206 const gchar
*image_down_name
,
207 const guchar
*image_down
,
212 const gchar
*password
);
214 gboolean
irreco_webdb_client_get_buttons(IrrecoWebdbClient
*self
,
216 IrrecoStringTable
**button_list
);
218 gboolean
irreco_webdb_client_get_button_by_id(IrrecoWebdbClient
*self
,
220 const char *theme_button_dir
);
222 gboolean
irreco_webdb_client_get_preview_button(IrrecoWebdbClient
*self
,
224 GdkPixbuf
**preview_button
);
226 gboolean
irreco_webdb_client_login(IrrecoWebdbClient
*self
,
228 const gchar
*password
);
230 #endif /* __IRRECO_WEBDB_CLIENT__ */