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 "irreco_webdb_remote.h"
59 #include <libsoup/soup.h>
60 /*#include <libsoup/soup-xmlrpc.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
*manufacturer
,
129 IrrecoStringTable
**config_list
);
131 gboolean
irreco_webdb_client_get_configuration(IrrecoWebdbClient
*self
,
133 IrrecoWebdbConf
**configuration
);
135 gint
irreco_webdb_client_get_config_id_by_file_hash_and_file_name(
136 IrrecoWebdbClient
*self
,
137 const gchar
*file_hash
,
138 const gchar
*file_name
);
140 gboolean
irreco_webdb_client_get_file(IrrecoWebdbClient
*self
,
141 const gchar
*file_hash
,
142 const gchar
*file_name
,
143 GString
**file_data
);
145 gboolean
irreco_webdb_client_get_user_exists(IrrecoWebdbClient
*self
,
146 const gchar
*name
, gboolean
*user_exists
);
148 gint
irreco_webdb_client_get_max_image_size(IrrecoWebdbClient
*self
);
150 gint
irreco_webdb_client_create_theme(IrrecoWebdbClient
*self
,
152 const gchar
*comment
,
153 const gchar
*preview_button
,
156 const gchar
*password
);
158 gboolean
irreco_webdb_client_set_theme_downloadable(IrrecoWebdbClient
*self
,
160 gboolean downloadable
,
162 const gchar
*password
);
164 gboolean
irreco_webdb_client_get_themes(IrrecoWebdbClient
*self
,
165 IrrecoStringTable
**theme_list
);
167 gboolean
irreco_webdb_client_get_theme_by_id(IrrecoWebdbClient
*self
,
169 IrrecoWebdbTheme
**theme
);
171 gboolean
irreco_webdb_client_get_theme_versions_by_name(IrrecoWebdbClient
*self
,
173 IrrecoStringTable
**theme_list
);
175 gchar
*irreco_webdb_client_get_theme_date_by_id(IrrecoWebdbClient
*self
,
178 gint
irreco_webdb_client_get_theme_id_by_name_and_date(IrrecoWebdbClient
*self
,
182 gint
irreco_webdb_client_add_bg_to_theme(IrrecoWebdbClient
*self
,
184 const gchar
*image_hash
,
185 const gchar
*image_name
,
191 const gchar
*password
);
193 gboolean
irreco_webdb_client_get_backgrounds(IrrecoWebdbClient
*self
,
195 IrrecoStringTable
**bg_list
);
197 gboolean
irreco_webdb_client_get_bg_by_id(IrrecoWebdbClient
*self
,
199 const char *theme_bg_dir
);
201 gint
irreco_webdb_client_add_button_to_theme(IrrecoWebdbClient
*self
,
204 const gchar
*text_format_up
,
205 const gchar
*text_format_down
,
209 const gchar
*image_up_hash
,
210 const gchar
*image_up_name
,
211 const guchar
*image_up
,
213 const gchar
*image_down_hash
,
214 const gchar
*image_down_name
,
215 const guchar
*image_down
,
220 const gchar
*password
);
222 gboolean
irreco_webdb_client_get_buttons(IrrecoWebdbClient
*self
,
224 IrrecoStringTable
**button_list
);
226 gboolean
irreco_webdb_client_get_button_by_id(IrrecoWebdbClient
*self
,
228 const char *theme_button_dir
);
230 gboolean
irreco_webdb_client_get_preview_button(IrrecoWebdbClient
*self
,
232 GdkPixbuf
**preview_button
);
234 gboolean
irreco_webdb_client_login(IrrecoWebdbClient
*self
,
236 const gchar
*password
);
238 gint
irreco_webdb_client_create_new_remote(IrrecoWebdbClient
*self
,
239 const gchar
*comment
,
240 const gchar
*category
,
241 const gchar
*manufacturer
,
243 const gchar
*file_name
,
244 const gchar
*file_data
,
246 const gchar
*password
);
248 gboolean
irreco_webdb_client_set_remote_downloadable(IrrecoWebdbClient
*self
,
250 gboolean downloadable
,
252 const gchar
*password
);
254 gboolean
irreco_webdb_client_add_configuration_to_remote(
255 IrrecoWebdbClient
*self
,
257 gint configuration_id
,
259 const gchar
*password
);
261 gboolean
irreco_webdb_client_add_theme_to_remote(IrrecoWebdbClient
*self
,
265 const gchar
*password
);
267 gboolean
irreco_webdb_client_get_remote_categories(IrrecoWebdbClient
*self
,
268 IrrecoStringTable
**category_list
);
270 gboolean
irreco_webdb_client_get_remote_manufacturers(IrrecoWebdbClient
*self
,
271 const gchar
*category
,
272 IrrecoStringTable
**manufacturer_list
);
274 gboolean
irreco_webdb_client_get_remote_models(IrrecoWebdbClient
*self
,
275 const gchar
*category
,
276 const gchar
*manufacturer
,
277 IrrecoStringTable
**model_list
);
279 gboolean
irreco_webdb_client_get_remote_creators(IrrecoWebdbClient
*self
,
280 const gchar
*category
,
281 const gchar
*manufacturer
,
283 IrrecoStringTable
**creators
);
285 gboolean
irreco_webdb_client_get_remotes(IrrecoWebdbClient
*self
,
286 const gchar
*category
,
287 const gchar
*manufacturer
,
289 const gchar
*creator
,
290 GList
**remote_list
);
292 gboolean
irreco_webdb_client_get_remote_by_id(IrrecoWebdbClient
*self
,
294 IrrecoWebdbRemote
**remote
);
296 gboolean
irreco_webdb_client_get_themes_of_remote(IrrecoWebdbClient
*self
,
300 gboolean
irreco_webdb_client_get_configurations_of_remote(
301 IrrecoWebdbClient
*self
,
305 gboolean
irreco_webdb_client_get_remote_data(IrrecoWebdbClient
*self
,
308 gboolean
irreco_webdb_client_get_lirc_dirs(IrrecoWebdbClient
*self
,
309 IrrecoStringTable
**dir_list
);
310 gboolean
irreco_webdb_client_get_lirc_manufacturers(IrrecoWebdbClient
*self
,
312 IrrecoStringTable
**manufacturer_list
);
313 gboolean
irreco_webdb_client_get_lirc_models(IrrecoWebdbClient
*self
,
314 const gchar
*manufacturer
,
315 IrrecoStringTable
**model_list
);
316 gboolean
irreco_webdb_client_get_lirc_file(IrrecoWebdbClient
*self
,
318 IrrecoStringTable
**file
);
321 #endif /* __IRRECO_WEBDB_CLIENT__ */