D-Bus  1.12.16
dbus-marshal-recursive.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-marshal-recursive.h Marshalling routines for recursive types
3  *
4  * Copyright (C) 2004, 2005 Red Hat, Inc.
5  *
6  * Licensed under the Academic Free License version 2.1
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 
24 #ifndef DBUS_MARSHAL_RECURSIVE_H
25 #define DBUS_MARSHAL_RECURSIVE_H
26 
27 #include <dbus/dbus-protocol.h>
28 #include <dbus/dbus-list.h>
29 
30 typedef struct DBusTypeReader DBusTypeReader;
31 typedef struct DBusTypeWriter DBusTypeWriter;
34 
40 {
48  int type_pos;
50  int value_pos;
53  union
54  {
55  struct {
56  int start_pos;
57  } array;
58  } u;
59 };
60 
65 {
75  int type_pos;
77  int value_pos;
79  union
80  {
81  struct {
82  int start_pos;
83  int len_pos;
85  } array;
86  } u;
87 };
88 
94 {
96  int new_len;
97 };
98 
99 DBUS_PRIVATE_EXPORT
101  int byte_order,
102  const DBusString *type_str,
103  int type_pos,
104  const DBusString *value_str,
105  int value_pos);
106 DBUS_PRIVATE_EXPORT
108  const DBusString *type_str,
109  int type_pos);
110 DBUS_PRIVATE_EXPORT
112 DBUS_PRIVATE_EXPORT
115 DBUS_PRIVATE_EXPORT
116 void _dbus_type_reader_read_basic (const DBusTypeReader *reader,
117  void *value);
119 DBUS_PRIVATE_EXPORT
121  void *value,
122  int *n_elements);
123 void _dbus_type_reader_read_raw (const DBusTypeReader *reader,
124  const unsigned char **value_location);
125 DBUS_PRIVATE_EXPORT
127  DBusTypeReader *subreader);
128 DBUS_PRIVATE_EXPORT
131 DBUS_PRIVATE_EXPORT
133  const DBusString **str_p,
134  int *start_p,
135  int *len_p);
136 DBUS_PRIVATE_EXPORT
138  const void *value,
139  const DBusTypeReader *realign_root);
140 DBUS_PRIVATE_EXPORT
142  const DBusTypeReader *realign_root);
143 
144 dbus_bool_t _dbus_type_reader_equal_values (const DBusTypeReader *lhs,
145  const DBusTypeReader *rhs);
146 
147 void _dbus_type_signature_next (const char *signature,
148  int *type_pos);
149 
150 DBUS_PRIVATE_EXPORT
152  int byte_order,
153  DBusString *type_str,
154  int type_pos,
155  DBusString *value_str,
156  int value_pos);
158  int byte_order,
159  DBusString *value_str,
160  int value_pos);
162  DBusString *type_str,
163  int type_pos);
165 DBUS_PRIVATE_EXPORT
167  int byte_order,
168  const DBusString *type_str,
169  int type_pos,
170  DBusString *value_str,
171  int value_pos);
172 DBUS_PRIVATE_EXPORT
174  int type,
175  const void *value);
176 DBUS_PRIVATE_EXPORT
178  int element_type,
179  const void *value,
180  int n_elements);
181 DBUS_PRIVATE_EXPORT
183  int container_type,
184  const DBusString *contained_type,
185  int contained_type_start,
186  DBusTypeWriter *sub);
187 DBUS_PRIVATE_EXPORT
189  DBusTypeWriter *sub);
191  const DBusString *contained_type,
192  int contained_type_start,
193  DBusTypeWriter *sub);
194 DBUS_PRIVATE_EXPORT
196  DBusTypeReader *reader);
197 
198 
199 #endif /* DBUS_MARSHAL_RECURSIVE_H */