summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-transport-protected.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-01-19 03:33:35 +0000
committerHavoc Pennington <hp@redhat.com>2003-01-19 03:33:35 +0000
commit502fbda2201a4e7e50d687f42af29c82e66299bb (patch)
tree39aef7adb025c95dd016714dffd8577402a4669a /dbus/dbus-transport-protected.h
parent0363701c341796278041fb9ea7de80eaaf41479a (diff)
2003-01-18 Havoc Pennington <hp@pobox.com>
* dbus/dbus-transport-unix.c (unix_do_iteration): only do the reading/writing if read_watch != NULL or write_watch != NULL. * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix the message loader code to actually load message->header and message->body into the newly-created message. * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak in OOM case * dbus/dbus-connection.c (dbus_connection_set_max_message_size) (dbus_connection_get_max_message_size) (dbus_connection_set_max_live_messages_size) (dbus_connection_get_max_live_messages_size): implement some resource limitation functions * dbus/dbus-resources.c: new file implementing some of the resource limits stuff * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add missing docs, add @todo to handle OOM etc. * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing docs
Diffstat (limited to 'dbus/dbus-transport-protected.h')
-rw-r--r--dbus/dbus-transport-protected.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/dbus/dbus-transport-protected.h b/dbus/dbus-transport-protected.h
index b9bbb40d..46dfe141 100644
--- a/dbus/dbus-transport-protected.h
+++ b/dbus/dbus-transport-protected.h
@@ -28,6 +28,7 @@
#include <dbus/dbus-transport.h>
#include <dbus/dbus-message-internal.h>
#include <dbus/dbus-auth.h>
+#include <dbus/dbus-resources.h>
DBUS_BEGIN_DECLS;
@@ -63,6 +64,9 @@ struct DBusTransportVTable
/**< Called to do a single "iteration" (block on select/poll
* followed by reading or writing data).
*/
+
+ void (* live_messages_changed) (DBusTransport *transport);
+ /**< Outstanding messages counter changed */
};
struct DBusTransport
@@ -77,7 +81,11 @@ struct DBusTransport
DBusAuth *auth; /**< Authentication conversation */
- DBusCredentials credentials; /**< Credentials of other end */
+ DBusCredentials credentials; /**< Credentials of other end */
+
+ long max_live_messages_size; /**< Max total size of received messages. */
+
+ DBusCounter *live_messages_size; /**< Counter for size of all live messages. */
unsigned int disconnected : 1; /**< #TRUE if we are disconnected. */
unsigned int authenticated : 1; /**< Cache of auth state; use _dbus_transport_get_is_authenticated() to query value */