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 * @addtogroup IrrecoBackendDevice
27 * Header file of @ref IrrecoBackendDevice.
30 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 * Make sure that typedefs are available before we include anything elese.
36 * This makes sure that whatever other structures that depend on structures
37 * defined in this file will compile OK recardles of header inclusion order.
39 #ifndef __IRRECO_BACKEND_DEVICE_H_TYPEDEF__
40 #define __IRRECO_BACKEND_DEVICE_H_TYPEDEF__
41 typedef struct _IrrecoBackendDevice IrrecoBackendDevice
;
42 #endif /* __IRRECO_BACKEND_DEVICE_H_TYPEDEF__ */
46 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
48 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
49 #ifndef __IRRECO_BACKEND_DEVICE_H__
50 #define __IRRECO_BACKEND_DEVICE_H__
52 #include "irreco_backend_instance.h"
53 #include <irreco_string_table.h>
57 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
59 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
60 struct _IrrecoBackendDevice
{
61 IrrecoBackendInstance
*backend_instance
;
64 IrrecoStringTable
*command_list
;
69 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
71 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
74 * Check if command_list is empty.
76 * Returns: TRUE if empty, FALSE otherwise.
78 #define irreco_backend_device_is_empty(_device) \
79 irreco_string_table_is_empty(_device->command_list)
82 * Iterate through the list of commands the device supports.
84 #define IRRECO_BACKEND_DEVICE_FOREACH(_device, _command_var_name) \
85 IRRECO_STRING_TABLE_FOREACH_KEY(_device->command_list, \
87 #define IRRECO_BACKEND_DEVICE_FOREACH_END IRRECO_STRING_TABLE_FOREACH_END
91 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
93 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
95 irreco_backend_device_create(const gchar
*name
,
96 IrrecoBackendInstance
* backend_instance
,
98 void irreco_backend_device_destroy(IrrecoBackendDevice
*backend_device
);
99 gboolean
irreco_backend_device_is_editable(IrrecoBackendDevice
* device
);
100 void irreco_backend_device_edit(IrrecoBackendDevice
*backend_device
,
102 void irreco_backend_device_delete(IrrecoBackendDevice
*backend_device
,
106 #endif /* __IRRECO_BACKEND_DEVICE_H__ */