D-Bus: dbus-message-private.h Source File

D-Bus 1.8.16

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List

dbus-message-private.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-message-private.h header shared between dbus-message.c and dbus-message-util.c
3 *
4 * Copyright (C) 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 #ifndef DBUS_MESSAGE_PRIVATE_H
24 #define DBUS_MESSAGE_PRIVATE_H
25
26 #include <dbus/dbus-message.h>
27 #include <dbus/dbus-message-internal.h>
28 #include <dbus/dbus-string.h>
29 #include <dbus/dbus-dataslot.h>
30 #include <dbus/dbus-marshal-header.h>
31
32 DBUS_BEGIN_DECLS
33
60 struct DBusMessageLoader
61 {
62 int refcount;
64 DBusString data;
66 DBusList *messages;
68 long max_message_size;
69 long max_message_unix_fds;
71 DBusValidity corruption_reason;
73 unsigned int corrupted : 1;
75 unsigned int buffer_outstanding : 1;
77 #ifdef HAVE_UNIX_FD_PASSING
78 unsigned int unix_fds_outstanding : 1;
80 int *unix_fds;
81 unsigned n_unix_fds_allocated;
82 unsigned n_unix_fds;
83 void (* unix_fds_change) (void *);
84 void *unix_fds_change_data;
85 #endif
86 };
87
88
90 #define CHANGED_STAMP_BITS 21
91
99 struct DBusMessage
100 {
101 DBusAtomic refcount;
103 DBusHeader header;
105 DBusString body;
107 unsigned int locked : 1;
109 #ifndef DBUS_DISABLE_CHECKS
110 unsigned int in_cache : 1;
111 #endif
112
113 DBusList *counters;
114 long size_counter_delta;
116 dbus_uint32_t changed_stamp : CHANGED_STAMP_BITS;
118 DBusDataSlotList slot_list;
120 #ifndef DBUS_DISABLE_CHECKS
121 int generation;
122 #endif
123
124 #ifdef HAVE_UNIX_FD_PASSING
125 int *unix_fds;
129 unsigned n_unix_fds;
130 unsigned n_unix_fds_allocated;
132 long unix_fd_counter_delta;
133 #endif
134 };
135
136 dbus_bool_t _dbus_message_iter_get_args_valist (DBusMessageIter *iter,
137 DBusError *error,
138 int first_arg_type,
139 va_list var_args);
140
143 DBUS_END_DECLS
144
145 #endif /* DBUS_MESSAGE_H */
DBusAtomic
An atomic integer safe to increment or decrement from multiple threads.
Definition: dbus-sysdeps.h:227
DBusMessage::changed_stamp
dbus_uint32_t changed_stamp
Incremented when iterators are invalidated.
Definition: dbus-message-private.h:116
DBUS_BEGIN_DECLS
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
DBusMessageLoader::messages
DBusList * messages
Complete messages.
Definition: dbus-message-private.h:66
_dbus_message_iter_get_args_valist
dbus_bool_t _dbus_message_iter_get_args_valist(DBusMessageIter *iter, DBusError *error, int first_arg_type, va_list var_args)
Implementation of the varargs arg-getting functions.
Definition: dbus-message.c:796
DBusMessage::body
DBusString body
Body network data.
Definition: dbus-message-private.h:105
DBusValidity
DBusValidity
This is primarily used in unit testing, so we can verify that each invalid message is invalid for the...
Definition: dbus-marshal-validate.h:49
DBusMessageIter
DBusMessageIter struct; contains no public fields.
Definition: dbus-message.h:51
DBusMessage
Internals of DBusMessage.
Definition: dbus-message-private.h:99
DBusString
Definition: dbus-string.h:42
dbus_bool_t
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
Definition: dbus-types.h:35
DBusMessage::header
DBusHeader header
Header network data and associated cache.
Definition: dbus-message-private.h:103
DBusMessageLoader::data
DBusString data
Buffered data.
Definition: dbus-message-private.h:64
DBusMessage::locked
unsigned int locked
Message being sent, no modifications allowed.
Definition: dbus-message-private.h:107
DBusMessageLoader::max_message_size
long max_message_size
Maximum size of a message.
Definition: dbus-message-private.h:68
DBusMessage::counters
DBusList * counters
0-N DBusCounter used to track message size/unix fds.
Definition: dbus-message-private.h:113
DBusMessage::size_counter_delta
long size_counter_delta
Size we incremented the size counters by.
Definition: dbus-message-private.h:114
CHANGED_STAMP_BITS
#define CHANGED_STAMP_BITS
How many bits are in the changed_stamp used to validate iterators.
Definition: dbus-message-private.h:90
DBusError
Object representing an exception.
Definition: dbus-errors.h:48
DBusMessage::in_cache
unsigned int in_cache
Has been "freed" since it's in the cache (this is a debug feature)
Definition: dbus-message-private.h:110
DBusDataSlotList
Data structure that stores the actual user data set at a given slot.
Definition: dbus-dataslot.h:69
DBusMessageLoader::max_message_unix_fds
long max_message_unix_fds
Maximum unix fds in a message.
Definition: dbus-message-private.h:69
DBusMessageLoader::corrupted
unsigned int corrupted
We got broken data, and are no longer working.
Definition: dbus-message-private.h:73
DBusMessage::refcount
DBusAtomic refcount
Reference count.
Definition: dbus-message-private.h:101
DBusList
A node in a linked list.
Definition: dbus-list.h:34
DBusHeader
Message header data and some cached details of it.
Definition: dbus-marshal-header.h:47
DBusMessageLoader::buffer_outstanding
unsigned int buffer_outstanding
Someone is using the buffer to read.
Definition: dbus-message-private.h:75
DBusMessage::generation
int generation
_dbus_current_generation when message was created
Definition: dbus-message-private.h:121
DBusMessageLoader::refcount
int refcount
Reference count.
Definition: dbus-message-private.h:62
DBusMessageLoader::corruption_reason
DBusValidity corruption_reason
why we were corrupted
Definition: dbus-message-private.h:71
DBusMessageLoader
Implementation details of DBusMessageLoader.
Definition: dbus-message-private.h:60
DBusMessage::slot_list
DBusDataSlotList slot_list
Data stored by allocated integer ID.
Definition: dbus-message-private.h:118
DBUS_END_DECLS
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.