mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-04 05:00:16 +01:00
* Land the new message args API and type system. This patch is huge, but the public API change is not really large. The set of D-BUS types has changed somewhat, and the arg "getters" are more geared toward language bindings; they don't make a copy, etc. There are also some known issues. See these emails for details on this huge patch: http://lists.freedesktop.org/archives/dbus/2004-December/001836.html http://lists.freedesktop.org/archives/dbus/2005-January/001922.html * dbus/dbus-marshal-*: all the new stuff * dbus/dbus-message.c: basically rewritten * dbus/dbus-memory.c (check_guards): with "guards" enabled, init freed blocks to be all non-nul bytes so using freed memory is less likely to work right * dbus/dbus-internals.c (_dbus_test_oom_handling): add DBUS_FAIL_MALLOC=N environment variable, so you can do DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or DBUS_FAIL_MALLOC=10 to make it really, really, really slow and thorough. * qt/message.cpp: port to the new message args API (operator<<): use str.utf8() rather than str.unicode() (pretty sure this is right from the Qt docs?) * glib/dbus-gvalue.c: port to the new message args API * bus/dispatch.c, bus/driver.c: port to the new message args API * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the "locked" flag to TRUE and align_offset to 0; I guess we never looked at these anyhow, but seems cleaner. * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING): move allocation padding macro to this header; use it to implement (_DBUS_STRING_STATIC): ability to declare a static string. * dbus/dbus-message.c (_dbus_message_has_type_interface_member): change to return TRUE if the interface is not set. * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff to dbus-marshal-validate.[hc] * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from dbus-internals.c * dbus/Makefile.am: cut over from dbus-marshal.[hc] to dbus-marshal-*.[hc] * dbus/dbus-object-tree.c (_dbus_decompose_path): move this function here from dbus-marshal.c
74 lines
3.7 KiB
C
74 lines
3.7 KiB
C
/* -*- mode: C; c-file-style: "gnu" -*- */
|
|
/* dbus-message-internal.h DBusMessage object internal interfaces
|
|
*
|
|
* Copyright (C) 2002 Red Hat Inc.
|
|
*
|
|
* Licensed under the Academic Free License version 2.1
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
*/
|
|
#ifndef DBUS_MESSAGE_INTERNAL_H
|
|
#define DBUS_MESSAGE_INTERNAL_H
|
|
|
|
#include <dbus/dbus-message.h>
|
|
#include <dbus/dbus-resources.h>
|
|
#include <dbus/dbus-list.h>
|
|
|
|
DBUS_BEGIN_DECLS
|
|
|
|
typedef struct DBusMessageLoader DBusMessageLoader;
|
|
|
|
void _dbus_message_get_network_data (DBusMessage *message,
|
|
const DBusString **header,
|
|
const DBusString **body);
|
|
|
|
void _dbus_message_lock (DBusMessage *message);
|
|
void _dbus_message_unlock (DBusMessage *message);
|
|
void _dbus_message_set_serial (DBusMessage *message,
|
|
dbus_uint32_t serial);
|
|
dbus_bool_t _dbus_message_add_size_counter (DBusMessage *message,
|
|
DBusCounter *counter);
|
|
void _dbus_message_add_size_counter_link (DBusMessage *message,
|
|
DBusList *link);
|
|
void _dbus_message_remove_size_counter (DBusMessage *message,
|
|
DBusCounter *counter,
|
|
DBusList **link_return);
|
|
|
|
DBusMessageLoader* _dbus_message_loader_new (void);
|
|
DBusMessageLoader* _dbus_message_loader_ref (DBusMessageLoader *loader);
|
|
void _dbus_message_loader_unref (DBusMessageLoader *loader);
|
|
|
|
void _dbus_message_loader_get_buffer (DBusMessageLoader *loader,
|
|
DBusString **buffer);
|
|
void _dbus_message_loader_return_buffer (DBusMessageLoader *loader,
|
|
DBusString *buffer,
|
|
int bytes_read);
|
|
dbus_bool_t _dbus_message_loader_queue_messages (DBusMessageLoader *loader);
|
|
DBusMessage* _dbus_message_loader_peek_message (DBusMessageLoader *loader);
|
|
DBusMessage* _dbus_message_loader_pop_message (DBusMessageLoader *loader);
|
|
DBusList* _dbus_message_loader_pop_message_link (DBusMessageLoader *loader);
|
|
void _dbus_message_loader_putback_message_link (DBusMessageLoader *loader,
|
|
DBusList *link);
|
|
|
|
dbus_bool_t _dbus_message_loader_get_is_corrupted (DBusMessageLoader *loader);
|
|
|
|
void _dbus_message_loader_set_max_message_size (DBusMessageLoader *loader,
|
|
long size);
|
|
long _dbus_message_loader_get_max_message_size (DBusMessageLoader *loader);
|
|
|
|
DBUS_END_DECLS
|
|
|
|
#endif /* DBUS_MESSAGE_H */
|