1 /* -*- mode: C; c-file-style: "gnu" -*- */
2 /* dbus-string.h String utility class (internal to D-BUS implementation)
4 * Copyright (C) 2002 Red Hat, Inc.
6 * Licensed under the Academic Free License version 1.2
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include <dbus/dbus-internals.h>
28 #include <dbus/dbus-memory.h>
29 #include <dbus/dbus-types.h>
33 typedef struct DBusString DBusString;
37 void *dummy1; /**< placeholder */
38 int dummy2; /**< placeholder */
39 int dummy3; /**< placeholder */
40 int dummy4; /**< placeholder */
41 unsigned int dummy5 : 1; /** placeholder */
42 unsigned int dummy6 : 1; /** placeholder */
43 unsigned int dummy7 : 1; /** placeholder */
46 dbus_bool_t _dbus_string_init (DBusString *str,
48 void _dbus_string_init_const (DBusString *str,
50 void _dbus_string_free (DBusString *str);
51 void _dbus_string_lock (DBusString *str);
53 void _dbus_string_get_data (DBusString *str,
55 void _dbus_string_get_const_data (const DBusString *str,
56 const char **data_return);
57 void _dbus_string_get_data_len (DBusString *str,
61 void _dbus_string_get_const_data_len (const DBusString *str,
62 const char **data_return,
65 dbus_bool_t _dbus_string_steal_data (DBusString *str,
67 dbus_bool_t _dbus_string_steal_data_len (DBusString *str,
72 int _dbus_string_get_length (const DBusString *str);
74 dbus_bool_t _dbus_string_lengthen (DBusString *str,
75 int additional_length);
76 void _dbus_string_shorten (DBusString *str,
77 int length_to_remove);
78 dbus_bool_t _dbus_string_set_length (DBusString *str,
81 dbus_bool_t _dbus_string_append (DBusString *str,
83 dbus_bool_t _dbus_string_append_len (DBusString *str,
86 dbus_bool_t _dbus_string_append_int (DBusString *str,
88 dbus_bool_t _dbus_string_append_double (DBusString *str,
90 dbus_bool_t _dbus_string_append_byte (DBusString *str,
92 dbus_bool_t _dbus_string_append_unichar (DBusString *str,
96 void _dbus_string_delete (DBusString *str,
99 dbus_bool_t _dbus_string_move (DBusString *source,
103 dbus_bool_t _dbus_string_copy (const DBusString *source,
107 dbus_bool_t _dbus_string_move_len (DBusString *source,
112 dbus_bool_t _dbus_string_copy_len (const DBusString *source,
119 void _dbus_string_get_unichar (const DBusString *str,
121 dbus_unichar_t *ch_return,
124 dbus_bool_t _dbus_string_parse_int (const DBusString *str,
128 dbus_bool_t _dbus_string_parse_double (const DBusString *str,
136 #endif /* DBUS_STRING_H */