Commit 0fd6498c authored by David Zeuthen's avatar David Zeuthen

Add "Since: 2.26" to all new GDBus API

parent c490c14f
......@@ -135,7 +135,6 @@
<xi:include href="xml/gdbusmessage.xml"/>
<xi:include href="xml/gdbusconnection.xml"/>
<xi:include href="xml/gdbusmethodinvocation.xml"/>
<xi:include href="xml/gdbusproxy.xml"/>
<xi:include href="xml/gdbusserver.xml"/>
<xi:include href="xml/gdbusauthobserver.xml"/>
</chapter>
......@@ -144,6 +143,7 @@
<xi:include href="xml/gdbusnameowning.xml"/>
<xi:include href="xml/gdbusnamewatching.xml"/>
<xi:include href="xml/gdbusproxywatching.xml"/>
<xi:include href="xml/gdbusproxy.xml"/>
</chapter>
<chapter id="utils">
<title>Utilities</title>
......
......@@ -100,6 +100,8 @@ g_credentials_init (GCredentials *credentials)
* Creates a new empty credentials object.
*
* Returns: A #GCredentials. Free with g_object_unref().
*
* Since: 2.26
*/
GCredentials *
g_credentials_new (void)
......@@ -132,6 +134,8 @@ g_credentials_new_for_unix_process (void)
* platform.
*
* Returns: A #GCredentials. Free with g_object_unref().
*
* Since: 2.26
*/
GCredentials *
g_credentials_new_for_process (void)
......@@ -157,6 +161,8 @@ g_credentials_new_for_process (void)
*
* Returns: A #GCredentials or %NULL if @error is set. The return
* object must be freed with g_object_unref().
*
* Since: 2.26
*/
GCredentials *
g_credentials_new_for_string (const gchar *str,
......@@ -212,6 +218,8 @@ g_credentials_new_for_string (const gchar *str,
* g_credentials_new_for_string().
*
* Returns: A string that should be freed with g_free().
*
* Since: 2.26
*/
gchar *
g_credentials_to_string (GCredentials *credentials)
......@@ -244,6 +252,8 @@ g_credentials_to_string (GCredentials *credentials)
* Checks if @credentials has a UNIX user credential.
*
* Returns: %TRUE if @credentials has this type of credential, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_credentials_has_unix_user (GCredentials *credentials)
......@@ -259,6 +269,8 @@ g_credentials_has_unix_user (GCredentials *credentials)
* Gets the UNIX user identifier from @credentials.
*
* Returns: The identifier or -1 if unset.
*
* Since: 2.26
*/
gint64
g_credentials_get_unix_user (GCredentials *credentials)
......@@ -273,6 +285,8 @@ g_credentials_get_unix_user (GCredentials *credentials)
* @user_id: A UNIX user identifier (typically type #uid_t) or -1 to unset it.
*
* Sets the UNIX user identifier.
*
* Since: 2.26
*/
void
g_credentials_set_unix_user (GCredentials *credentials,
......@@ -291,6 +305,8 @@ g_credentials_set_unix_user (GCredentials *credentials,
* Checks if @credentials has a UNIX group credential.
*
* Returns: %TRUE if @credentials has this type of credential, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_credentials_has_unix_group (GCredentials *credentials)
......@@ -306,6 +322,8 @@ g_credentials_has_unix_group (GCredentials *credentials)
* Gets the UNIX group identifier from @credentials.
*
* Returns: The identifier or -1 if unset.
*
* Since: 2.26
*/
gint64
g_credentials_get_unix_group (GCredentials *credentials)
......@@ -320,6 +338,8 @@ g_credentials_get_unix_group (GCredentials *credentials)
* @group_id: A UNIX group identifier (typically type #gid_t) or -1 to unset.
*
* Sets the UNIX group identifier.
*
* Since: 2.26
*/
void
g_credentials_set_unix_group (GCredentials *credentials,
......@@ -338,6 +358,8 @@ g_credentials_set_unix_group (GCredentials *credentials,
* Checks if @credentials has a UNIX process credential.
*
* Returns: %TRUE if @credentials has this type of credential, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_credentials_has_unix_process (GCredentials *credentials)
......@@ -353,6 +375,8 @@ g_credentials_has_unix_process (GCredentials *credentials)
* Gets the UNIX process identifier from @credentials.
*
* Returns: The identifier or -1 if unset.
*
* Since: 2.26
*/
gint64
g_credentials_get_unix_process (GCredentials *credentials)
......@@ -367,6 +391,8 @@ g_credentials_get_unix_process (GCredentials *credentials)
* @process_id: A UNIX process identifier (typically type #pid_t/#GPid) or -1 to unset.
*
* Sets the UNIX process identifier.
*
* Since: 2.26
*/
void
g_credentials_set_unix_process (GCredentials *credentials,
......@@ -385,6 +411,8 @@ g_credentials_set_unix_process (GCredentials *credentials,
* Checks if @credentials has a Windows user SID (Security Identifier).
*
* Returns: %TRUE if @credentials has this type of credential, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_credentials_has_windows_user (GCredentials *credentials)
......@@ -400,6 +428,8 @@ g_credentials_has_windows_user (GCredentials *credentials)
* Gets the Windows User SID from @credentials.
*
* Returns: A string or %NULL if unset. Do not free, the string is owned by @credentials.
*
* Since: 2.26
*/
const gchar *
g_credentials_get_windows_user (GCredentials *credentials)
......@@ -414,6 +444,8 @@ g_credentials_get_windows_user (GCredentials *credentials)
* @user_sid: The Windows User SID or %NULL to unset.
*
* Sets the Windows User SID.
*
* Since: 2.26
*/
void
g_credentials_set_windows_user (GCredentials *credentials,
......
......@@ -42,6 +42,8 @@ typedef struct _GCredentialsPrivate GCredentialsPrivate;
*
* The #GCredentials structure contains only private data and
* should only be accessed using the provided API.
*
* Since: 2.26
*/
struct _GCredentials
{
......@@ -54,6 +56,8 @@ struct _GCredentials
* GCredentialsClass:
*
* Class structure for #GCredentials.
*
* Since: 2.26
*/
struct _GCredentialsClass
{
......
......@@ -58,6 +58,8 @@
* checks.
*
* Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_dbus_is_address (const gchar *string)
......@@ -335,6 +337,8 @@ is_valid_tcp (const gchar *address_entry,
*
* Returns: %TRUE if @string is a valid D-Bus address that is
* supported by this library, %FALSE if @error is set.
*
* Since: 2.26
*/
gboolean
g_dbus_is_supported_address (const gchar *string,
......@@ -759,6 +763,8 @@ get_stream_thread_func (GSimpleAsyncResult *res,
*
* This is an asynchronous failable function. See
* g_dbus_address_get_stream_sync() for the synchronous version.
*
* Since: 2.26
*/
void
g_dbus_address_get_stream (const gchar *address,
......@@ -796,6 +802,8 @@ g_dbus_address_get_stream (const gchar *address,
* Finishes an operation started with g_dbus_address_get_stream().
*
* Returns: A #GIOStream or %NULL if @error is set.
*
* Since: 2.26
*/
GIOStream *
g_dbus_address_get_stream_finish (GAsyncResult *res,
......@@ -840,6 +848,8 @@ g_dbus_address_get_stream_finish (GAsyncResult *res,
* g_dbus_address_get_stream() for the asynchronous version.
*
* Returns: A #GIOStream or %NULL if @error is set.
*
* Since: 2.26
*/
GIOStream *
g_dbus_address_get_stream_sync (const gchar *address,
......@@ -918,6 +928,8 @@ get_session_address_platform_specific (void)
* platform specific mechanisms.
*
* Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
*
* Since: 2.26
*/
gchar *
g_dbus_address_get_for_bus_sync (GBusType bus_type,
......
......@@ -146,6 +146,8 @@ g_dbus_auth_observer_class_init (GDBusAuthObserverClass *klass)
* should be denied.
*
* Returns: %TRUE if the peer should be denied, %FALSE otherwise.
*
* Since: 2.26
*/
signals[DENY_AUTHENTICATED_PEER_SIGNAL] =
g_signal_new ("deny-authenticated-peer",
......@@ -179,6 +181,8 @@ g_dbus_auth_observer_init (GDBusAuthObserver *observer)
* Creates a new #GDBusAuthObserver object.
*
* Returns: A #GDBusAuthObserver. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusAuthObserver *
g_dbus_auth_observer_new (void)
......@@ -197,6 +201,8 @@ g_dbus_auth_observer_new (void)
* Emits the #GDBusAuthObserver::deny-authenticated-peer signal on @observer.
*
* Returns: %TRUE if the peer should be denied, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_dbus_auth_observer_deny_authenticated_peer (GDBusAuthObserver *observer,
......
......@@ -43,6 +43,8 @@ typedef struct _GDBusAuthObserverPrivate GDBusAuthObserverPrivate;
* @deny_authenticated_peer: Signal class handler for the #GDBusAuthObserver::deny-authenticated-peer signal.
*
* Class structure for #GDBusAuthObserverClass.
*
* Since: 2.26
*/
struct _GDBusAuthObserverClass
{
......@@ -82,6 +84,8 @@ struct _GDBusAuthObserverClass
*
* The #GDBusAuthObserver structure contains only private data and
* should only be accessed using the provided API.
*
* Since: 2.26
*/
struct _GDBusAuthObserver
{
......
......@@ -483,6 +483,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* GDBusConnection:stream:
*
* The underlying #GIOStream used for I/O.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_STREAM,
......@@ -502,6 +504,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
*
* A D-Bus address specifying potential endpoints that can be used
* when establishing the connection.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_ADDRESS,
......@@ -519,6 +523,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* GDBusConnection:flags:
*
* Flags from the #GDBusConnectionFlags enumeration.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_FLAGS,
......@@ -549,6 +555,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* #GDBusConnection:flags property you will be able to read the GUID
* of the other peer here after the connection has been succesfully
* initialized.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_GUID,
......@@ -568,6 +576,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
*
* The unique name as assigned by the message bus or %NULL if the
* connection is not open or not a message bus connection.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_UNIQUE_NAME,
......@@ -584,6 +594,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* GDBusConnection:closed:
*
* A boolean specifying whether the connection has been closed.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_CLOSED,
......@@ -602,6 +614,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* A boolean specifying whether the process will be terminated (by
* calling <literal>raise(SIGTERM)</literal>) if the connection
* is closed by the remote peer.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_EXIT_ON_CLOSE,
......@@ -620,6 +634,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
*
* Flags from the #GDBusCapabilityFlags enumeration
* representing connection features negotiated with the other peer.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_CAPABILITY_FLAGS,
......@@ -637,6 +653,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* GDBusConnection:authentication-observer:
*
* A #GDBusAuthObserver object to assist in the authentication process or %NULL.
*
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
PROP_AUTHENTICATION_OBSERVER,
......@@ -679,6 +697,8 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* Upon receiving this signal, you should give up your reference to
* @connection. You are guaranteed that this signal is emitted only
* once.
*
* Since: 2.26
*/
signals[CLOSED_SIGNAL] = g_signal_new ("closed",
G_TYPE_DBUS_CONNECTION,
......@@ -750,7 +770,9 @@ g_dbus_connection_get_stream (GDBusConnection *connection)
* Gets whether @connection is closed.
*
* Returns: %TRUE if the connection is closed, %FALSE otherwise.
**/
*
* Since: 2.26
*/
gboolean
g_dbus_connection_is_closed (GDBusConnection *connection)
{
......@@ -765,6 +787,8 @@ g_dbus_connection_is_closed (GDBusConnection *connection)
* Gets the capabilities negotiated with the remote peer
*
* Returns: One or more flags from the #GDBusCapabilityFlags enumeration.
*
* Since: 2.26
*/
GDBusCapabilityFlags
g_dbus_connection_get_capabilities (GDBusConnection *connection)
......@@ -849,6 +873,8 @@ set_closed_unlocked (GDBusConnection *connection,
* bus connection disconnects).
*
* If @connection is already closed, this method does nothing.
*
* Since: 2.26
*/
void
g_dbus_connection_close (GDBusConnection *connection)
......@@ -983,6 +1009,8 @@ g_dbus_connection_send_message_unlocked (GDBusConnection *connection,
*
* Returns: %TRUE if the message was well-formed and queued for
* transmission, %FALSE if @error is set.
*
* Since: 2.26
*/
gboolean
g_dbus_connection_send_message (GDBusConnection *connection,
......@@ -1297,6 +1325,8 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
* See <xref linkend="gdbus-server"/> and <xref
* linkend="gdbus-unix-fd-client"/> for an example of how to use this
* low-level API to send and receive UNIX file descriptors.
*
* Since: 2.26
*/
void
g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
......@@ -1339,6 +1369,8 @@ g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
* low-level API to send and receive UNIX file descriptors.
*
* Returns: A #GDBusMessage or %NULL if @error is set.
*
* Since: 2.26
*/
GDBusMessage *
g_dbus_connection_send_message_with_reply_finish (GDBusConnection *connection,
......@@ -1426,6 +1458,8 @@ send_message_with_reply_sync_cb (GDBusConnection *connection,
* low-level API to send and receive UNIX file descriptors.
*
* Returns: A #GDBusMessage that is the reply to @message or %NULL if @error is set.
*
* Since: 2.26
*/
GDBusMessage *
g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection,
......@@ -1856,6 +1890,8 @@ async_initable_iface_init (GAsyncInitableIface *async_initable_iface)
* This is a asynchronous failable constructor. See
* g_dbus_connection_new_sync() for the synchronous
* version.
*
* Since: 2.26
*/
void
g_dbus_connection_new (GIOStream *stream,
......@@ -1887,6 +1923,8 @@ g_dbus_connection_new (GIOStream *stream,
* Finishes an operation started with g_dbus_connection_new().
*
* Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusConnection *
g_dbus_connection_new_finish (GAsyncResult *res,
......@@ -1930,6 +1968,8 @@ g_dbus_connection_new_finish (GAsyncResult *res,
* g_dbus_connection_new() for the asynchronous version.
*
* Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusConnection *
g_dbus_connection_new_sync (GIOStream *stream,
......@@ -1978,6 +2018,8 @@ g_dbus_connection_new_sync (GIOStream *stream,
* This is a asynchronous failable constructor. See
* g_dbus_connection_new_for_address_sync() for the synchronous
* version.
*
* Since: 2.26
*/
void
g_dbus_connection_new_for_address (const gchar *address,
......@@ -2005,6 +2047,8 @@ g_dbus_connection_new_for_address (const gchar *address,
* Finishes an operation started with g_dbus_connection_new_for_address().
*
* Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusConnection *
g_dbus_connection_new_for_address_finish (GAsyncResult *res,
......@@ -2049,6 +2093,8 @@ g_dbus_connection_new_for_address_finish (GAsyncResult *res,
* g_dbus_connection_new_for_address() for the asynchronous version.
*
* Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusConnection *
g_dbus_connection_new_for_address_sync (const gchar *address,
......@@ -2077,6 +2123,8 @@ g_dbus_connection_new_for_address_sync (const gchar *address,
* Sets whether the process should be terminated when @connection is
* closed by the remote peer. See #GDBusConnection:exit-on-close for
* more details.
*
* Since: 2.26
*/
void
g_dbus_connection_set_exit_on_close (GDBusConnection *connection,
......@@ -2096,6 +2144,8 @@ g_dbus_connection_set_exit_on_close (GDBusConnection *connection,
*
* Returns: Whether the process is terminated when @connection is
* closed by the remote peer.
*
* Since: 2.26
*/
gboolean
g_dbus_connection_get_exit_on_close (GDBusConnection *connection)
......@@ -2113,7 +2163,9 @@ g_dbus_connection_get_exit_on_close (GDBusConnection *connection)
*
* Returns: The GUID. Do not free this string, it is owned by
* @connection.
**/
*
* Since: 2.26
*/
const gchar *
g_dbus_connection_get_guid (GDBusConnection *connection)
{
......@@ -2132,7 +2184,9 @@ g_dbus_connection_get_guid (GDBusConnection *connection)
* Returns: The unique name or %NULL if @connection is not a message
* bus connection. Do not free this string, it is owned by
* @connection.
**/
*
* Since: 2.26
*/
const gchar *
g_dbus_connection_get_unique_name (GDBusConnection *connection)
{
......@@ -2156,6 +2210,8 @@ g_dbus_connection_get_unique_name (GDBusConnection *connection)
*
* Returns: A #GCredentials or %NULL if not available. Do not free
* this object, it is owned by @connection.
*
* Since: 2.26
*/
GCredentials *
g_dbus_connection_get_peer_credentials (GDBusConnection *connection)
......@@ -2192,6 +2248,8 @@ static guint _global_filter_id = 1;
*
* Returns: A filter identifier that can be used with
* g_dbus_connection_remove_filter().
*
* Since: 2.26
*/
guint
g_dbus_connection_add_filter (GDBusConnection *connection,
......@@ -2427,7 +2485,9 @@ is_signal_data_for_name_lost_or_acquired (SignalData *signal_data)
* call g_dbus_connection_signal_unsubscribe() to remove a subscription.
*
* Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
**/
*
* Since: 2.26
*/
guint
g_dbus_connection_signal_subscribe (GDBusConnection *connection,
const gchar *sender,
......@@ -2607,7 +2667,9 @@ unsubscribe_id_internal (GDBusConnection *connection,
* @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
*
* Unsubscribes from signals.
**/
*
* Since: 2.26
*/
void
g_dbus_connection_signal_unsubscribe (GDBusConnection *connection,
guint subscription_id)
......@@ -3803,6 +3865,8 @@ obj_message_func (GDBusConnection *connection,
*
* Returns: 0 if @error is set, otherwise a registration id (never 0)
* that can be used with g_dbus_connection_unregister_object() .
*
* Since: 2.26
*/
guint
g_dbus_connection_register_object (GDBusConnection *connection,
......@@ -3889,6 +3953,8 @@ g_dbus_connection_register_object (GDBusConnection *connection,
* Unregisters an object.
*
* Returns: %TRUE if the object was unregistered, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_dbus_connection_unregister_object (GDBusConnection *connection,
......@@ -3947,6 +4013,8 @@ g_dbus_connection_unregister_object (GDBusConnection *connection,
* This can only fail if @parameters is not compatible with the D-Bus protocol.
*
* Returns: %TRUE unless @error is set.
*
* Since: 2.26
*/
gboolean
g_dbus_connection_emit_signal (GDBusConnection *connection,
......@@ -4029,6 +4097,8 @@ add_invoke_method_flags (GDBusMessage *message,
* g_dbus_connection_invoke_method_finish() to get the result of the operation.
* See g_dbus_connection_invoke_method_sync() for the synchronous version of this
* function.
*
* Since: 2.26
*/
void
g_dbus_connection_invoke_method (GDBusConnection *connection,
......@@ -4115,6 +4185,8 @@ decode_method_reply (GDBusMessage *reply, GError **error)
*
* Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
* return values. Free with g_variant_unref().
*
* Since: 2.26
*/
GVariant *
g_dbus_connection_invoke_method_finish (GDBusConnection *connection,
......@@ -4173,6 +4245,8 @@ g_dbus_connection_invoke_method_finish (GDBusConnection *connection,
*
* Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
* return values. Free with g_variant_unref().
*
* Since: 2.26
*/
GVariant *
g_dbus_connection_invoke_method_sync (GDBusConnection *connection,
......@@ -4695,6 +4769,8 @@ subtree_message_func (GDBusConnection *connection,
*
* Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
* that can be used with g_dbus_connection_unregister_subtree() .
*
* Since: 2.26
*/
guint
g_dbus_connection_register_subtree (GDBusConnection *connection,
......@@ -4764,6 +4840,8 @@ g_dbus_connection_register_subtree (GDBusConnection *connection,
* Unregisters a subtree.
*
* Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_dbus_connection_unregister_subtree (GDBusConnection *connection,
......@@ -5132,6 +5210,8 @@ get_uninitialized_connection (GBusType bus_type,
* the #GDBusConnection:exit-on-close property set to %TRUE.
*
* Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusConnection *
g_bus_get_sync (GBusType bus_type,
......@@ -5198,6 +5278,8 @@ bus_get_async_initable_cb (GObject *source_object,
*
* This is a asynchronous failable function. See g_bus_get_sync() for
* the synchronous version.
*
* Since: 2.26
*/
void
g_bus_get (GBusType bus_type,
......@@ -5251,6 +5333,8 @@ g_bus_get (GBusType bus_type,
* the #GDBusConnection:exit-on-close property set to %TRUE.
*
* Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
*
* Since: 2.26
*/
GDBusConnection *
g_bus_get_finish (GAsyncResult *res,
......
......@@ -42,6 +42,8 @@ typedef struct _GDBusConnectionPrivate GDBusConnectionPrivate;
*
* The #GDBusConnection structure contains only private data and
* should only be accessed using the provided API.
*
* Since: 2.26
*/
struct _GDBusConnection
{
......@@ -55,6 +57,8 @@ struct _GDBusConnection
* @closed: Signal class handler for the #GDBusConnection::closed signal.
*
* Class structure for #GDBusConnection.
*
* Since: 2.26
*/
struct _GDBusConnectionClass
{
......@@ -207,6 +211,8 @@ GVariant *g_dbus_connection_invoke_method_sync (GDBusConnection
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
*
* The type of the @method_call function in #GDBusInterfaceVTable.
*
* Since: 2.26
*/
typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection,
const gchar *sender,
......@@ -230,6 +236,8 @@ typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection,
* The type of the @get_property function in #GDBusInterfaceVTable.
*
* Returns: A newly-allocated #GVariant with the value for @property_name or %NULL if @error is set.
*
* Since: 2.26
*/
typedef GVariant *(*GDBusInterfaceGetPropertyFunc) (GDBusConnection *connection,
const gchar *sender,
......@@ -253,6 +261,8 @@ typedef GVariant *(*GDBusInterfaceGetPropertyFunc) (GDBusConnection *conne
* The type of the @set_property function in #GDBusInterfaceVTable.
*
* Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
*
* Since: 2.26
*/
typedef gboolean (*GDBusInterfaceSetPropertyFunc) (GDBusConnection *connection,
const gchar *sender,
......@@ -275,6 +285,8 @@ typedef gboolean (*GDBusInterfaceSetPropertyFunc) (GDBusConnection *conne
* If you want to handle getting/setting D-Bus properties asynchronously, simply
* register an object with the <literal>org.freedesktop.DBus.Properties</literal>
* D-Bus interface using g_dbus_connection_register_object().
*
* Since: 2.26
*/
struct _GDBusInterfaceVTable
{
......@@ -317,6 +329,8 @@ gboolean g_dbus_connection_unregister_object (GDBusConnection
* The type of the @enumerate function in #GDBusSubtreeVTable.
*
* Returns: A newly allocated array of strings for node names that are children of @object_path.
*
* Since: 2.26
*/
typedef gchar** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection,
const gchar *sender,
......@@ -335,6 +349,8 @@ typedef gchar** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection,
*
* Returns: A newly-allocated #GPtrArray with pointers to #GDBusInterfaceInfo describing
* the interfaces implemented by @node.
*
* Since: 2.26
*/
typedef GPtrArray *(*GDBusSubtreeIntrospectFunc) (GDBusConnection *connection,
const gchar *sender,
......@@ -355,6 +371,8 @@ typedef GPtrArray *(*GDBusSubtreeIntrospectFunc) (GDBusConnection *connect
* The type of the @dispatch function in #GDBusSubtreeVTable.
*
* Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
*
* Since: 2.26
*/
typedef const GDBusInterfaceVTable * (*GDBusSubtreeDispatchFunc) (GDBusConnection *connection,
const gchar *sender,
......@@ -371,6 +389,8 @@ typedef const GDBusInterfaceVTable * (*GDBusSubtreeDispatchFunc) (GDBusConnectio
* @dispatch: Function for dispatching a remote call on a child node.
*
* Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
*
* Since: 2.26
*/
struct _GDBusSubtreeVTable
{
......@@ -413,6 +433,8 @@ gboolean g_dbus_connection_unregister_subtree (GDBusConnection
* @user_data: User data passed when subscribing to the signal.
*
* Signature for callback function used in g_dbus_connection_signal_subscribe().
*
* Since: 2.26
*/
typedef void (*GDBusSignalCallback) (GDBusConnection *connection,
const gchar *sender_name,
......@@ -446,6 +468,8 @@ void g_dbus_connection_signal_unsubscribe (GDBusConnection
*
* Returns: %TRUE if the filter handled @message, %FALSE to let other
* handlers run.
*
* Since: 2.26
*/
typedef gboolean (*GDBusMessageFilterFunction) (GDBusConnection *connection,
GDBusMessage *message,
......
......@@ -167,6 +167,8 @@ g_dbus_error_quark (void)
* @num_entries: Number of items to register.
*
* Helper function for associating a #GError error domain with D-Bus error names.
*
* Since: 2.26
*/
void
g_dbus_error_register_error_domain (const gchar *error_domain_quark_name,
......@@ -336,6 +338,8 @@ static GHashTable *dbus_error_name_to_re = NULL;
*
* Returns: %TRUE if the association was created, %FALSE if it already
* exists.
*
* Since: 2.26
*/
gboolean
g_dbus_error_register_error (GQuark error_domain,
......@@ -395,6 +399,8 @@ g_dbus_error_register_error (GQuark error_domain,
* Destroys an association previously set up with g_dbus_error_register_error().
*
* Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
*
* Since: 2.26
*/
gboolean
g_dbus_error_unregister_error (GQuark error_domain,
......@@ -463,6 +469,8 @@ g_dbus_error_unregister_error (GQuark error_domain,
*
* Returns: %TRUE if @error represents an error from a remote peer,
* %FALSE otherwise.
*
* Since: 2.26
*/
gboolean
g_dbus_error_is_remote_error (const GError *error)
......@@ -483,6 +491,8 @@ g_dbus_error_is_remote_error (const GError *error)
* unless g_dbus_error_strip_remote_error() has been used on @error.
*
* Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
*
* Since: 2.26
*/
gchar *
g_dbus_error_get_remote_error (const GError *error)
......@@ -568,6 +578,8 @@ g_dbus_error_get_remote_error (const GError *error)
* it.
*
* Returns: An allocated #GError. Free with g_error_free().
*
* Since: 2.26