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 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
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_CACHE_H_TYPEDEF__
31 #define __IRRECO_WEBDB_CACHE_H_TYPEDEF__
32 typedef struct _IrrecoWebdbCache IrrecoWebdbCache
;
33 #endif /* __IRRECO_WEBDB_CACHE_H_TYPEDEF__ */
38 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
40 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
41 #ifndef __IRRECO_WEBDB_CACHE_H__
42 #define __IRRECO_WEBDB_CACHE_H__
43 #include "irreco_webdb.h"
44 #include <irreco_retry_loop.h>
45 #include "irreco_webdb_conf.h"
46 #include "irreco_webdb_theme.h"
48 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
50 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
52 struct _IrrecoWebdbCache
56 IrrecoRetryLoop
*loop
;
57 IrrecoStringTable
*categories
;
58 IrrecoStringTable
*manufacturers
;
60 GHashTable
*conf_hash
;
61 IrrecoStringTable
*themes
;
65 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
67 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
71 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
73 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
74 IrrecoWebdbCache
*irreco_webdb_cache_new();
75 void irreco_webdb_cache_free(IrrecoWebdbCache
*self
);
76 const gchar
*irreco_webdb_cache_get_error(IrrecoWebdbCache
*self
);
77 gboolean
irreco_webdb_cache_add_user(IrrecoWebdbCache
*self
,
82 gboolean
irreco_webdb_cache_upload_configuration(IrrecoWebdbCache
*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_cache_get_categories(IrrecoWebdbCache
*self
,
94 IrrecoStringTable
**categories
);
96 gboolean
irreco_webdb_cache_get_all_categories(IrrecoWebdbCache
*self
,
97 IrrecoStringTable
**categories
);
99 gboolean
irreco_webdb_cache_get_manufacturers(IrrecoWebdbCache
*self
,
100 const gchar
*category
,
101 IrrecoStringTable
**manufacturers
);
103 gboolean
irreco_webdb_cache_get_all_manufacturers(IrrecoWebdbCache
*self
,
104 IrrecoStringTable
**manufacturers
);
106 gboolean
irreco_webdb_cache_get_models(IrrecoWebdbCache
*self
,
107 const gchar
*category
,
108 const gchar
*manufacturer
,
109 IrrecoStringTable
**models
);
111 gboolean
irreco_webdb_cache_get_configs(IrrecoWebdbCache
*self
,
112 const gchar
*category
,
113 const gchar
*manufacturer
,
115 IrrecoStringTable
**configs
);
117 gboolean
irreco_webdb_cache_get_configuration(IrrecoWebdbCache
*self
,
119 IrrecoWebdbConf
**config
);
121 gboolean
irreco_webdb_cache_get_file(IrrecoWebdbCache
*self
,
122 const gchar
*file_hash
,
123 const gchar
*file_name
,
124 GString
**file_data
);
126 gboolean
irreco_webdb_cache_get_user_exists(IrrecoWebdbCache
*self
,
128 gboolean
*user_exists
);
130 gboolean
irreco_webdb_cache_login(IrrecoWebdbCache
*self
,
132 const gchar
*password
);
133 gboolean
irreco_webdb_cache_get_themes(IrrecoWebdbCache
*self
,
134 IrrecoStringTable
**theme
);
135 gboolean
irreco_webdb_cache_get_theme_by_id(IrrecoWebdbCache
*self
,
137 IrrecoWebdbTheme
**theme
);
139 #endif /* __IRRECO_WEBDB_CACHE_H__ */