Clean code and added a few amendments (if()).
[irreco.git] / irreco / src / core / irreco_data.h
blob8e67d3c45984d554591431c0c45d747b44e94da9
1 /*
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.
20 /**
21 * @addtogroup IrrecoData
22 * @{
25 /**
26 * @file
27 * Header file of @ref IrrecoData.
33 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 /* Typedef */
35 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
37 * Make sure that typedefs are available before we include anything elese.
39 * This makes sure that whatever other structures that depend on structures
40 * defined in this file will compile OK recardles of header inclusion order.
42 #ifndef __IRRECO_DATA_H_TYPEDEF__
43 #define __IRRECO_DATA_H_TYPEDEF__
44 typedef struct _IrrecoData IrrecoData;
45 #endif /* __IRRECO_DATA_H_TYPEDEF__ */
49 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
50 /* Include */
51 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
52 #ifndef __IRRECO_DATA_H__
53 #define __IRRECO_DATA_H__
54 #include "irreco.h"
55 #include "irreco_hardkey_map.h"
56 #include <irreco_string_table.h>
57 #include "irreco_button_dlg.h"
58 #include "irreco_backend_manager.h"
59 #include "irreco_cmd_chain_manager.h"
60 #include "irreco_window_manager.h"
61 #include <irreco_webdb.h>
63 #include "irreco_theme_manager.h"
67 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
68 /* Datatypes */
69 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
72 * Main IRRECO data structure.
74 struct _IrrecoData {
76 /* Ui resoirrecoes */
77 HildonProgram *program;
79 /* Contains all layouts. */
80 IrrecoStringTable *irreco_layout_array;
82 /* Backend manager. */
83 IrrecoBackendManager *irreco_backend_manager;
85 /* Window manager. */
86 IrrecoWindowManager *window_manager;
88 /* We use this dialog to create new buttons. */
89 IrrecoButtonDlg *new_button_dlg;
91 /* Keeps a list of IrrecoCmdChains assosiated with
92 Hardkeys and buttons. */
93 IrrecoCmdChainManager *cmd_chain_manager;
95 IrrecoWebdbCache *webdb_cache;
97 /* Contains all themes */
98 IrrecoThemeManager *theme_manager;
103 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
104 /* Macro */
105 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
109 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
110 /* Prototypes */
111 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
112 IrrecoData *irreco_data_new();
113 void irreco_data_free(IrrecoData * irreco_data);
114 IrrecoWebdbCache *irreco_data_get_webdb_cache(IrrecoData *self,
115 gboolean reset);
118 #endif /* __IRRECO_DATA_H__ */
120 /** @} */