2 * irreco - Ir Remote Control
3 * Copyright (C) 2007,2008 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 IrrecoWebdbCache
27 * Header file of @ref IrrecoWebdbCache.
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_CACHE_H_TYPEDEF__
41 #define __IRRECO_WEBDB_CACHE_H_TYPEDEF__
42 typedef struct _IrrecoWebdbCache IrrecoWebdbCache
;
43 #endif /* __IRRECO_WEBDB_CACHE_H_TYPEDEF__ */
48 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
50 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
51 #ifndef __IRRECO_WEBDB_CACHE_H__
52 #define __IRRECO_WEBDB_CACHE_H__
53 #include "irreco_webdb.h"
54 #include <irreco_retry_loop.h>
55 #include "irreco_webdb_conf.h"
56 #include "irreco_webdb_theme.h"
58 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
60 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
62 struct _IrrecoWebdbCache
66 IrrecoRetryLoop
*loop
;
67 IrrecoStringTable
*categories
;
68 IrrecoStringTable
*manufacturers
;
70 GHashTable
*conf_hash
;
71 GHashTable
*theme_id_hash
;
75 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
77 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
81 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
83 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
84 IrrecoWebdbCache
*irreco_webdb_cache_new();
85 void irreco_webdb_cache_free(IrrecoWebdbCache
*self
);
86 const gchar
*irreco_webdb_cache_get_error(IrrecoWebdbCache
*self
);
87 gboolean
irreco_webdb_cache_add_user(IrrecoWebdbCache
*self
,
92 gboolean
irreco_webdb_cache_upload_configuration(IrrecoWebdbCache
*self
,
94 const gchar
*category
,
95 const gchar
*file_hash
,
96 const gchar
*file_name
,
97 const gchar
*manufacturer
,
99 const gchar
*password
,
103 gboolean
irreco_webdb_cache_get_categories(IrrecoWebdbCache
*self
,
104 IrrecoStringTable
**categories
);
106 gboolean
irreco_webdb_cache_get_all_categories(IrrecoWebdbCache
*self
,
107 IrrecoStringTable
**categories
);
109 gboolean
irreco_webdb_cache_get_manufacturers(IrrecoWebdbCache
*self
,
110 const gchar
*category
,
111 IrrecoStringTable
**manufacturers
);
113 gboolean
irreco_webdb_cache_get_all_manufacturers(IrrecoWebdbCache
*self
,
114 IrrecoStringTable
**manufacturers
);
116 gboolean
irreco_webdb_cache_get_models(IrrecoWebdbCache
*self
,
117 const gchar
*category
,
118 const gchar
*manufacturer
,
119 IrrecoStringTable
**models
);
121 gboolean
irreco_webdb_cache_get_configs(IrrecoWebdbCache
*self
,
122 const gchar
*category
,
123 const gchar
*manufacturer
,
125 IrrecoStringTable
**configs
);
127 gboolean
irreco_webdb_cache_get_configuration(IrrecoWebdbCache
*self
,
129 IrrecoWebdbConf
**config
);
131 gboolean
irreco_webdb_cache_get_file(IrrecoWebdbCache
*self
,
132 const gchar
*file_hash
,
133 const gchar
*file_name
,
134 GString
**file_data
);
136 gboolean
irreco_webdb_cache_get_user_exists(IrrecoWebdbCache
*self
,
138 gboolean
*user_exists
);
140 gboolean
irreco_webdb_cache_login(IrrecoWebdbCache
*self
,
142 const gchar
*password
);
143 gboolean
irreco_webdb_cache_get_themes(IrrecoWebdbCache
*self
,
144 IrrecoStringTable
**theme
);
145 gboolean
irreco_webdb_cache_get_theme_by_id(IrrecoWebdbCache
*self
,
147 IrrecoWebdbTheme
**theme
);
148 gboolean
irreco_webdb_cache_get_preview_button(IrrecoWebdbCache
*self
,
150 IrrecoWebdbTheme
**theme
);
151 gboolean
irreco_webdb_cache_get_backgrounds(IrrecoWebdbCache
*self
,
153 IrrecoStringTable
**bg_list
);
154 gboolean
irreco_webdb_cache_get_bg_by_id(IrrecoWebdbCache
*self
,
156 const char *theme_bg_dir
);
157 gboolean
irreco_webdb_cache_get_buttons(IrrecoWebdbCache
*self
,
159 IrrecoStringTable
**button_list
);
160 gboolean
irreco_webdb_cache_get_button_by_id(IrrecoWebdbCache
*self
,
162 const char *theme_button_dir
);
164 #endif /* __IRRECO_WEBDB_CACHE_H__ */