diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-16 20:16:47 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-16 20:16:47 +0000 |
commit | ebb57e719c32becd95a1efe3dd269c21e5a011b6 (patch) | |
tree | 1712e557855a60576828b45683505d329631a462 /dbus/dbus-connection.h | |
parent | 021305e5686fc4847fec942922d2115ae5c9c2bb (diff) |
2003-03-16 Havoc Pennington <hp@pobox.com>
* dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
this. always run the test suite before commit...
* bus/*: adapt to DBusConnection API changes
* glib/dbus-gmain.c: adapt to DBusConnection API changes,
requires renaming stuff to avoid dbus_connection_dispatch name
conflict.
* dbus/dbus-transport.c (_dbus_transport_queue_messages): new
function
* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
separate from _dbus_message_loader_return_buffer()
* dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
this, because it's now always broken to use; the number of
messages in queue vs. the number still buffered by the message
loader is undefined/meaningless. Should use
dbus_connection_get_dispatch_state().
(dbus_connection_dispatch): rename from
dbus_connection_dispatch_message
Diffstat (limited to 'dbus/dbus-connection.h')
-rw-r--r-- | dbus/dbus-connection.h | 105 |
1 files changed, 53 insertions, 52 deletions
diff --git a/dbus/dbus-connection.h b/dbus/dbus-connection.h index 78a8d58c..b4e6007d 100644 --- a/dbus/dbus-connection.h +++ b/dbus/dbus-connection.h @@ -56,6 +56,13 @@ typedef enum * can be present in current state). */ } DBusWatchFlags; +typedef enum +{ + DBUS_DISPATCH_DATA_REMAINS, /**< There is more data to potentially convert to messages. */ + DBUS_DISPATCH_COMPLETE, /**< All currently available data has been processed. */ + DBUS_DISPATCH_NEED_MEMORY /**< More memory is needed to continue. */ +} DBusDispatchStatus; + typedef dbus_bool_t (* DBusAddWatchFunction) (DBusWatch *watch, void *data); typedef void (* DBusWatchToggledFunction) (DBusWatch *watch, @@ -70,58 +77,52 @@ typedef void (* DBusTimeoutToggledFunction) (DBusTimeout *timeout, typedef void (* DBusRemoveTimeoutFunction) (DBusTimeout *timeout, void *data); -DBusConnection* dbus_connection_open (const char *address, - DBusResultCode *result); -void dbus_connection_ref (DBusConnection *connection); -void dbus_connection_unref (DBusConnection *connection); -void dbus_connection_disconnect (DBusConnection *connection); -dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection); -dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection); -void dbus_connection_flush (DBusConnection *connection); -int dbus_connection_get_n_messages (DBusConnection *connection); -DBusMessage* dbus_connection_borrow_message (DBusConnection *connection); -void dbus_connection_return_message (DBusConnection *connection, - DBusMessage *message); -void dbus_connection_steal_borrowed_message (DBusConnection *connection, - DBusMessage *message); -DBusMessage* dbus_connection_pop_message (DBusConnection *connection); -dbus_bool_t dbus_connection_dispatch_message (DBusConnection *connection); - - -dbus_bool_t dbus_connection_send (DBusConnection *connection, - DBusMessage *message, - dbus_int32_t *client_serial); -dbus_bool_t dbus_connection_send_with_reply (DBusConnection *connection, - DBusMessage *message, - DBusMessageHandler *reply_handler, - int timeout_milliseconds); -DBusMessage *dbus_connection_send_with_reply_and_block (DBusConnection *connection, - DBusMessage *message, - int timeout_milliseconds, - DBusError *error); - - -dbus_bool_t dbus_connection_set_watch_functions (DBusConnection *connection, - DBusAddWatchFunction add_function, - DBusRemoveWatchFunction remove_function, - DBusWatchToggledFunction toggled_function, - void *data, - DBusFreeFunction free_data_function); -dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection *connection, - DBusAddTimeoutFunction add_function, - DBusRemoveTimeoutFunction remove_function, - DBusTimeoutToggledFunction toggled_function, - void *data, - DBusFreeFunction free_data_function); -void dbus_connection_set_wakeup_main_function (DBusConnection *connection, - DBusWakeupMainFunction wakeup_main_function, - void *data, - DBusFreeFunction free_data_function); -void dbus_connection_handle_watch (DBusConnection *connection, - DBusWatch *watch, - unsigned int condition); - - +DBusConnection* dbus_connection_open (const char *address, + DBusResultCode *result); +void dbus_connection_ref (DBusConnection *connection); +void dbus_connection_unref (DBusConnection *connection); +void dbus_connection_disconnect (DBusConnection *connection); +dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection); +dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection); +void dbus_connection_flush (DBusConnection *connection); +DBusMessage* dbus_connection_borrow_message (DBusConnection *connection); +void dbus_connection_return_message (DBusConnection *connection, + DBusMessage *message); +void dbus_connection_steal_borrowed_message (DBusConnection *connection, + DBusMessage *message); +DBusMessage* dbus_connection_pop_message (DBusConnection *connection); +DBusDispatchStatus dbus_connection_get_dispatch_status (DBusConnection *connection); +DBusDispatchStatus dbus_connection_dispatch (DBusConnection *connection); +dbus_bool_t dbus_connection_send (DBusConnection *connection, + DBusMessage *message, + dbus_int32_t *client_serial); +dbus_bool_t dbus_connection_send_with_reply (DBusConnection *connection, + DBusMessage *message, + DBusMessageHandler *reply_handler, + int timeout_milliseconds); +DBusMessage * dbus_connection_send_with_reply_and_block (DBusConnection *connection, + DBusMessage *message, + int timeout_milliseconds, + DBusError *error); +dbus_bool_t dbus_connection_set_watch_functions (DBusConnection *connection, + DBusAddWatchFunction add_function, + DBusRemoveWatchFunction remove_function, + DBusWatchToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function); +dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection *connection, + DBusAddTimeoutFunction add_function, + DBusRemoveTimeoutFunction remove_function, + DBusTimeoutToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function); +void dbus_connection_set_wakeup_main_function (DBusConnection *connection, + DBusWakeupMainFunction wakeup_main_function, + void *data, + DBusFreeFunction free_data_function); +void dbus_connection_handle_watch (DBusConnection *connection, + DBusWatch *watch, + unsigned int condition); int dbus_watch_get_fd (DBusWatch *watch); |