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 unsigned int locked : 1; 00107 #ifndef DBUS_DISABLE_CHECKS 00108 unsigned int in_cache : 1; 00109 #endif 00110 00111 DBusList *counters; 00112 long size_counter_delta; 00114 dbus_uint32_t changed_stamp : CHANGED_STAMP_BITS; 00116 DBusDataSlotList slot_list; 00118 #ifndef DBUS_DISABLE_CHECKS 00119 int generation; 00120 #endif 00121 00122 #ifdef HAVE_UNIX_FD_PASSING 00123 int *unix_fds; 00127 unsigned n_unix_fds; 00128 unsigned n_unix_fds_allocated; 00130 long unix_fd_counter_delta; 00131 #endif 00132 }; 00133 00134 dbus_bool_t _dbus_message_iter_get_args_valist (DBusMessageIter *iter, 00135 DBusError *error, 00136 int first_arg_type, 00137 va_list var_args); 00138 00141 DBUS_END_DECLS 00142 00143 #endif /* DBUS_MESSAGE_H */