File: demarshal_code.h

package info (click to toggle)
libnih 1.0.3-4.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,544 kB
  • sloc: ansic: 188,634; sh: 11,217; makefile: 1,116; yacc: 291; xml: 239; sed: 16
file content (95 lines) | stat: -rw-r--r-- 3,602 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* nih-dbus-tool
 *
 * Copyright © 2010 Scott James Remnant <scott@netsplit.com>.
 * Copyright © 2010 Canonical Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2, as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef NIH_DBUS_TOOL_TESTS_DEMARSHAL_CODE_H
#define NIH_DBUS_TOOL_TESTS_DEMARSHAL_CODE_H

#include <nih/macros.h>

#include <dbus/dbus.h>

#include <stdint.h>

typedef struct my_struct_value {
	char *    item0;
	uint32_t  item1;
	char **   item2;
	int16_t * item3;
	size_t    item3_len;
} MyStructValue;

typedef struct my_struct_array_value_element {
	char *    item0;
	uint32_t  item1;
} MyStructArrayValueElement;

typedef struct my_dict_entry_array_value_element {
	char *    item0;
	uint32_t  item1;
} MyDictEntryArrayValueElement;


NIH_BEGIN_EXTERN

int my_byte_demarshal               (const void *parent, DBusMessage *message,
				     uint8_t *value);
int my_boolean_demarshal            (const void *parent, DBusMessage *message,
				     int *value);
int my_int16_demarshal              (const void *parent, DBusMessage *message,
				     int16_t *value);
int my_uint16_demarshal             (const void *parent, DBusMessage *message,
				     uint16_t *value);
int my_int32_demarshal              (const void *parent, DBusMessage *message,
				     int32_t *value);
int my_uint32_demarshal             (const void *parent, DBusMessage *message,
				     uint32_t *value);
int my_int64_demarshal              (const void *parent, DBusMessage *message,
				     int64_t *value);
int my_uint64_demarshal             (const void *parent, DBusMessage *message,
				     uint64_t *value);
int my_double_demarshal             (const void *parent, DBusMessage *message,
				     double *value);
int my_string_demarshal             (const void *parent, DBusMessage *message,
				     char **value);
int my_object_path_demarshal        (const void *parent, DBusMessage *message,
				     char **value);
int my_signature_demarshal          (const void *parent, DBusMessage *message,
				     char **value);
int my_int16_array_demarshal        (const void *parent, DBusMessage *message,
				     int16_t **value,
				     size_t *value_len);
int my_int16_array_array_demarshal  (const void *parent, DBusMessage *message,
				     int16_t ***value,
				     size_t **value_len);
int my_string_array_demarshal       (const void *parent, DBusMessage *message,
				     char ***value);
int my_string_array_array_demarshal (const void *parent, DBusMessage *message,
				     char ****value);
int my_struct_demarshal             (const void *parent, DBusMessage *message,
				     MyStructValue **value);
int my_struct_array_demarshal       (const void *parent, DBusMessage *message,
				     MyStructArrayValueElement ***value);
int my_dict_entry_array_demarshal   (const void *parent, DBusMessage *message,
				     MyDictEntryArrayValueElement ***value);
int my_unix_fd_demarshal            (const void *parent, DBusMessage *message,
				     int *value);

NIH_END_EXTERN

#endif /* NIH_DBUS_TOOL_TESTS_DEMARSHAL_CODE_H */