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-message.h>
61 #include "irreco_sha1.h"
63 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
65 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
67 struct _IrrecoWebdbClient
74 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
76 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
80 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
82 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
83 IrrecoWebdbClient
*irreco_webdb_client_new();
84 void irreco_webdb_client_free(IrrecoWebdbClient
*self
);
85 void irreco_webdb_client_get_error_msg(IrrecoWebdbClient
*self
, GString
*msg
);
86 gboolean
irreco_webdb_client_add_user(IrrecoWebdbClient
*self
,
90 gboolean
irreco_webdb_client_add_uber(IrrecoWebdbClient
*self
,
94 gboolean
irreco_webdb_client_upload_configuration(IrrecoWebdbClient
*self
,
96 const gchar
*category
,
97 const gchar
*file_hash
,
98 const gchar
*file_name
,
99 const gchar
*manufacturer
,
101 const gchar
*password
,
105 gboolean
irreco_webdb_client_sum(IrrecoWebdbClient
*self
,
109 gboolean
irreco_webdb_client_get_categories(IrrecoWebdbClient
*self
,
110 IrrecoStringTable
**category_list
);
112 gboolean
irreco_webdb_client_get_all_categories(IrrecoWebdbClient
*self
,
113 IrrecoStringTable
**category_list
);
115 gboolean
irreco_webdb_client_get_manufacturers(IrrecoWebdbClient
*self
,
116 const gchar
*category
,
117 IrrecoStringTable
**manufacturer_list
);
119 gboolean
irreco_webdb_client_get_all_manufacturers(IrrecoWebdbClient
*self
,
120 IrrecoStringTable
**manufacturer_list
);
122 gboolean
irreco_webdb_client_get_models(IrrecoWebdbClient
*self
,
123 const gchar
*category
,
124 const gchar
*manufacturer
,
125 IrrecoStringTable
**model_list
);
127 gboolean
irreco_webdb_client_get_configs(IrrecoWebdbClient
*self
,
128 const gchar
*category
,
129 const gchar
*manufacturer
,
131 IrrecoStringTable
**config_list
);
133 gboolean
irreco_webdb_client_get_configuration(IrrecoWebdbClient
*self
,
135 IrrecoWebdbConf
**configuration
);
137 gint
irreco_webdb_client_get_config_id_by_file_hash_and_file_name(
138 IrrecoWebdbClient
*self
,
139 const gchar
*file_hash
,
140 const gchar
*file_name
);
142 gboolean
irreco_webdb_client_get_file(IrrecoWebdbClient
*self
,
143 const gchar
*file_hash
,
144 const gchar
*file_name
,
145 GString
**file_data
);
147 gboolean
irreco_webdb_client_get_user_exists(IrrecoWebdbClient
*self
,
148 const gchar
*name
, gboolean
*user_exists
);
150 gint
irreco_webdb_client_get_max_image_size(IrrecoWebdbClient
*self
);
152 gint
irreco_webdb_client_create_theme(IrrecoWebdbClient
*self
,
154 const gchar
*comment
,
155 const gchar
*preview_button
,
158 const gchar
*password
);
160 gboolean
irreco_webdb_client_set_theme_downloadable(IrrecoWebdbClient
*self
,
162 gboolean downloadable
,
164 const gchar
*password
);
166 gboolean
irreco_webdb_client_get_themes(IrrecoWebdbClient
*self
,
167 IrrecoStringTable
**theme_list
);
169 gboolean
irreco_webdb_client_get_theme_by_id(IrrecoWebdbClient
*self
,
171 IrrecoWebdbTheme
**theme
);
173 gboolean
irreco_webdb_client_get_theme_versions_by_name(IrrecoWebdbClient
*self
,
175 IrrecoStringTable
**theme_list
);
177 gchar
*irreco_webdb_client_get_theme_date_by_id(IrrecoWebdbClient
*self
,
180 gint
irreco_webdb_client_get_theme_id_by_name_and_date(IrrecoWebdbClient
*self
,
184 gint
irreco_webdb_client_add_bg_to_theme(IrrecoWebdbClient
*self
,
186 const gchar
*image_hash
,
187 const gchar
*image_name
,
193 const gchar
*password
);
195 gboolean
irreco_webdb_client_get_backgrounds(IrrecoWebdbClient
*self
,
197 IrrecoStringTable
**bg_list
);
199 gboolean
irreco_webdb_client_get_bg_by_id(IrrecoWebdbClient
*self
,
201 const char *theme_bg_dir
);
203 gint
irreco_webdb_client_add_button_to_theme(IrrecoWebdbClient
*self
,
206 const gchar
*text_format_up
,
207 const gchar
*text_format_down
,
211 const gchar
*image_up_hash
,
212 const gchar
*image_up_name
,
213 const guchar
*image_up
,
215 const gchar
*image_down_hash
,
216 const gchar
*image_down_name
,
217 const guchar
*image_down
,
222 const gchar
*password
);
224 gboolean
irreco_webdb_client_get_buttons(IrrecoWebdbClient
*self
,
226 IrrecoStringTable
**button_list
);
228 gboolean
irreco_webdb_client_get_button_by_id(IrrecoWebdbClient
*self
,
230 const char *theme_button_dir
);
232 gboolean
irreco_webdb_client_get_preview_button(IrrecoWebdbClient
*self
,
234 GdkPixbuf
**preview_button
);
236 gboolean
irreco_webdb_client_login(IrrecoWebdbClient
*self
,
238 const gchar
*password
);
240 gint
irreco_webdb_client_create_new_remote(IrrecoWebdbClient
*self
,
241 const gchar
*comment
,
242 const gchar
*category
,
243 const gchar
*manufacturer
,
245 const gchar
*file_name
,
246 const gchar
*file_data
,
248 const gchar
*password
);
250 gboolean
irreco_webdb_client_set_remote_downloadable(IrrecoWebdbClient
*self
,
252 gboolean downloadable
,
254 const gchar
*password
);
256 gboolean
irreco_webdb_client_add_configuration_to_remote(
257 IrrecoWebdbClient
*self
,
259 gint configuration_id
,
261 const gchar
*password
);
263 gboolean
irreco_webdb_client_add_theme_to_remote(IrrecoWebdbClient
*self
,
267 const gchar
*password
);
269 gboolean
irreco_webdb_client_get_remote_categories(IrrecoWebdbClient
*self
,
270 IrrecoStringTable
**category_list
);
272 gboolean
irreco_webdb_client_get_remote_manufacturers(IrrecoWebdbClient
*self
,
273 const gchar
*category
,
274 IrrecoStringTable
**manufacturer_list
);
276 gboolean
irreco_webdb_client_get_remote_models(IrrecoWebdbClient
*self
,
277 const gchar
*category
,
278 const gchar
*manufacturer
,
279 IrrecoStringTable
**model_list
);
281 gboolean
irreco_webdb_client_get_remote_creators(IrrecoWebdbClient
*self
,
282 const gchar
*category
,
283 const gchar
*manufacturer
,
285 IrrecoStringTable
**creators
);
287 gboolean
irreco_webdb_client_get_remotes(IrrecoWebdbClient
*self
,
288 const gchar
*category
,
289 const gchar
*manufacturer
,
291 const gchar
*creator
,
292 GList
**remote_list
);
294 gboolean
irreco_webdb_client_get_remote_by_id(IrrecoWebdbClient
*self
,
296 IrrecoWebdbRemote
**remote
);
298 gboolean
irreco_webdb_client_get_themes_of_remote(IrrecoWebdbClient
*self
,
302 gboolean
irreco_webdb_client_get_configurations_of_remote(
303 IrrecoWebdbClient
*self
,
307 #endif /* __IRRECO_WEBDB_CLIENT__ */