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_BACKEND_DEVICE_H_TYPEDEF__
31 #define __IRRECO_BACKEND_DEVICE_H_TYPEDEF__
32 typedef struct _IrrecoBackendDevice IrrecoBackendDevice
;
33 #endif /* __IRRECO_BACKEND_DEVICE_H_TYPEDEF__ */
37 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
39 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
40 #ifndef __IRRECO_BACKEND_DEVICE_H__
41 #define __IRRECO_BACKEND_DEVICE_H__
43 #include "irreco_backend_instance.h"
44 #include <irreco_string_table.h>
48 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
50 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
51 struct _IrrecoBackendDevice
{
52 IrrecoBackendInstance
*backend_instance
;
55 IrrecoStringTable
*command_list
;
60 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
62 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
65 * Check if command_list is empty.
67 * Returns: TRUE if empty, FALSE otherwise.
69 #define irreco_backend_device_is_empty(_device) \
70 irreco_string_table_is_empty(_device->command_list)
73 * Iterate through the list of commands the device supports.
75 #define IRRECO_BACKEND_DEVICE_FOREACH(_device, _command_var_name) \
76 IRRECO_STRING_TABLE_FOREACH_KEY(_device->command_list, \
78 #define IRRECO_BACKEND_DEVICE_FOREACH_END IRRECO_STRING_TABLE_FOREACH_END
82 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
84 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
86 irreco_backend_device_create(const gchar
*name
,
87 IrrecoBackendInstance
* backend_instance
,
89 void irreco_backend_device_destroy(IrrecoBackendDevice
*backend_device
);
90 gboolean
irreco_backend_device_is_editable(IrrecoBackendDevice
* device
);
91 void irreco_backend_device_edit(IrrecoBackendDevice
*backend_device
,
93 void irreco_backend_device_delete(IrrecoBackendDevice
*backend_device
,
97 #endif /* __IRRECO_BACKEND_DEVICE_H__ */