D-Bus
1.4.18
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-message-private.h header shared between dbus-message.c and dbus-message-util.c 00003 * 00004 * Copyright (C) 2005 Red Hat Inc. 00005 * 00006 * Licensed under the Academic Free License version 2.1 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 */ 00023 #ifndef DBUS_MESSAGE_PRIVATE_H 00024 #define DBUS_MESSAGE_PRIVATE_H 00025 00026 #include <dbus/dbus-message.h> 00027 #include <dbus/dbus-message-internal.h> 00028 #include <dbus/dbus-string.h> 00029 #include <dbus/dbus-dataslot.h> 00030 #include <dbus/dbus-marshal-header.h> 00031 00032 DBUS_BEGIN_DECLS 00033 00060 struct DBusMessageLoader 00061 { 00062 int refcount; 00064 DBusString data; 00066 DBusList *messages; 00068 long max_message_size; 00069 long max_message_unix_fds; 00071 DBusValidity corruption_reason; 00073 unsigned int corrupted : 1; 00075 unsigned int buffer_outstanding : 1; 00077 #ifdef HAVE_UNIX_FD_PASSING 00078 unsigned int unix_fds_outstanding : 1; 00080 int *unix_fds; 00081 unsigned n_unix_fds_allocated; 00082 unsigned n_unix_fds; 00083 #endif 00084 }; 00085 00086 00088 #define CHANGED_STAMP_BITS 21 00089 00097 struct DBusMessage 00098 { 00099 DBusAtomic refcount; 00101 DBusHeader header; 00103 DBusString body; 00105 char byte_order; 00107 unsigned int locked : 1; 00109 #ifndef DBUS_DISABLE_CHECKS 00110 unsigned int in_cache : 1; 00111 #endif 00112 00113 DBusList *counters; 00114 long size_counter_delta; 00116 dbus_uint32_t changed_stamp : CHANGED_STAMP_BITS; 00118 DBusDataSlotList slot_list; 00120 #ifndef DBUS_DISABLE_CHECKS 00121 int generation; 00122 #endif 00123 00124 #ifdef HAVE_UNIX_FD_PASSING 00125 int *unix_fds; 00129 unsigned n_unix_fds; 00130 unsigned n_unix_fds_allocated; 00132 long unix_fd_counter_delta; 00133 #endif 00134 }; 00135 00136 dbus_bool_t _dbus_message_iter_get_args_valist (DBusMessageIter *iter, 00137 DBusError *error, 00138 int first_arg_type, 00139 va_list var_args); 00140 00141 typedef struct DBusInitialFDs DBusInitialFDs; 00142 DBusInitialFDs *_dbus_check_fdleaks_enter (void); 00143 void _dbus_check_fdleaks_leave (DBusInitialFDs *fds); 00144 00147 DBUS_END_DECLS 00148 00149 #endif /* DBUS_MESSAGE_H */