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 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
23 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
25 * Make sure that typedefs are available before we include anything elese.
27 * This makes sure that whatever other structures that depend on structures
28 * defined in this file will compile OK recardles of header inclusion order.
30 #ifndef __IRRECO_WEBDB_CLIENT_TYPEDEF__
31 #define __IRRECO_WEBDB_CLIENT_TYPEDEF__
32 typedef struct _IrrecoWebdbClient IrrecoWebdbClient
;
33 #endif /* __IRRECO_WEBDB_CLIENT_TYPEDEF__ */
37 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
39 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
40 #ifndef __IRRECO_WEBDB_CLIENT__
41 #define __IRRECO_WEBDB_CLIENT__
42 #include "irreco_webdb.h"
46 #include "irreco_webdb_conf.h"
47 #include <libsoup/soup.h>
48 #include <libsoup/soup-xmlrpc-message.h>
51 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
53 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
55 struct _IrrecoWebdbClient
62 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
64 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
68 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
70 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
71 IrrecoWebdbClient
*irreco_webdb_client_new();
72 void irreco_webdb_client_free(IrrecoWebdbClient
*self
);
73 void irreco_webdb_client_get_error_msg(IrrecoWebdbClient
*self
, GString
*msg
);
74 gboolean
irreco_webdb_client_add_user(IrrecoWebdbClient
*self
,
78 gboolean
irreco_webdb_client_add_uber(IrrecoWebdbClient
*self
,
82 gboolean
irreco_webdb_client_upload_configuration(IrrecoWebdbClient
*self
,
84 const gchar
*category
,
85 const gchar
*file_hash
,
86 const gchar
*file_name
,
87 const gchar
*manufacturer
,
89 const gchar
*password
,
93 gboolean
irreco_webdb_client_sum(IrrecoWebdbClient
*self
,
97 gboolean
irreco_webdb_client_get_categories(IrrecoWebdbClient
*self
,
98 IrrecoStringTable
**category_list
);
100 gboolean
irreco_webdb_client_get_all_categories(IrrecoWebdbClient
*self
,
101 IrrecoStringTable
**category_list
);
103 gboolean
irreco_webdb_client_get_manufacturers(IrrecoWebdbClient
*self
,
104 const gchar
*category
,
105 IrrecoStringTable
**manufacturer_list
);
107 gboolean
irreco_webdb_client_get_all_manufacturers(IrrecoWebdbClient
*self
,
108 IrrecoStringTable
**manufacturer_list
);
110 gboolean
irreco_webdb_client_get_models(IrrecoWebdbClient
*self
,
111 const gchar
*category
,
112 const gchar
*manufacturer
,
113 IrrecoStringTable
**model_list
);
115 gboolean
irreco_webdb_client_get_configs(IrrecoWebdbClient
*self
,
116 const gchar
*category
,
117 const gchar
*manufacturer
,
119 IrrecoStringTable
**config_list
);
121 gboolean
irreco_webdb_client_get_configuration(IrrecoWebdbClient
*self
,
123 IrrecoWebdbConf
**configuration
);
125 gboolean
irreco_webdb_client_get_file(IrrecoWebdbClient
*self
,
126 const gchar
*file_hash
,
127 const gchar
*file_name
,
128 GString
**file_data
);
130 gboolean
irreco_webdb_client_get_user_exists(IrrecoWebdbClient
*self
,
131 const gchar
*name
, gboolean
*user_exists
);
133 gint
irreco_webdb_client_create_theme(IrrecoWebdbClient
*self
,
135 const gchar
*comment
,
136 const gchar
*preview_button
,
139 const gchar
*password
);
141 gint
irreco_webdb_client_add_bg_to_theme(IrrecoWebdbClient
*self
,
143 const gchar
*image_hash
,
144 const gchar
*image_name
,
149 const gchar
*password
);
151 gint
irreco_webdb_client_add_button_to_theme(IrrecoWebdbClient
*self
,
154 const gchar
*text_format_up
,
155 const gchar
*text_format_down
,
157 const gchar
*image_up_hash
,
158 const gchar
*image_up_name
,
159 const gchar
*image_up
,
160 const gchar
*image_down_hash
,
161 const gchar
*image_down_name
,
162 const gchar
*image_down
,
166 const gchar
*password
);
168 gboolean
irreco_webdb_client_login(IrrecoWebdbClient
*self
,
170 const gchar
*password
);
172 #endif /* __IRRECO_WEBDB_CLIENT__ */