D-Bus  1.6.12
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 
100  int byte_order,
101  const DBusString *type_str,
102  int type_pos,
103  const DBusString *value_str,
104  int value_pos);
106  const DBusString *type_str,
107  int type_pos);
111 void _dbus_type_reader_read_basic (const DBusTypeReader *reader,
112  void *value);
115  void *value,
116  int *n_elements);
117 void _dbus_type_reader_read_raw (const DBusTypeReader *reader,
118  const unsigned char **value_location);
120  DBusTypeReader *subreader);
124  const DBusString **str_p,
125  int *start_p,
126  int *len_p);
128  const void *value,
129  const DBusTypeReader *realign_root);
131  const DBusTypeReader *realign_root);
132 
133 dbus_bool_t _dbus_type_reader_equal_values (const DBusTypeReader *lhs,
134  const DBusTypeReader *rhs);
135 
136 void _dbus_type_signature_next (const char *signature,
137  int *type_pos);
138 
140  int byte_order,
141  DBusString *type_str,
142  int type_pos,
143  DBusString *value_str,
144  int value_pos);
146  int byte_order,
147  DBusString *value_str,
148  int value_pos);
150  DBusString *type_str,
151  int type_pos);
154  int byte_order,
155  const DBusString *type_str,
156  int type_pos,
157  DBusString *value_str,
158  int value_pos);
160  int type,
161  const void *value);
163  int element_type,
164  const void *value,
165  int n_elements);
167  int container_type,
168  const DBusString *contained_type,
169  int contained_type_start,
170  DBusTypeWriter *sub);
172  DBusTypeWriter *sub);
174  const DBusString *contained_type,
175  int contained_type_start,
176  DBusTypeWriter *sub);
178  DBusTypeReader *reader);
179 
180 
181 #endif /* DBUS_MARSHAL_RECURSIVE_H */