Blame docs/reference/gio/html/gio-D-Bus-Addresses.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>D-Bus Addresses: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="gdbus-lowlevel.html" title="Low-level D-Bus Support">
Packit ae235b
<link rel="prev" href="gio-D-Bus-Utilities.html" title="D-Bus Utilities">
Packit ae235b
<link rel="next" href="gio-D-Bus-Introspection-Data.html" title="D-Bus Introspection Data">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

D-Bus Addresses

Packit ae235b

D-Bus Addresses — D-Bus connection endpoints

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_is_address ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_is_supported_address ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_address_get_stream ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GIOStream *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_address_get_stream_finish ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GIOStream *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_address_get_stream_sync ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_address_get_for_bus_sync ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_address_escape_value ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

Routines for working with D-Bus addresses. A D-Bus address is a string

Packit ae235b
like unix:tmpdir=/tmp/my-app-name. The exact format of addresses
Packit ae235b
is explained in detail in the
Packit ae235b
D-Bus specification.

Packit ae235b

TCP D-Bus connections are supported, but accessing them via a proxy is

Packit ae235b
currently not supported.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_dbus_is_address ()

Packit ae235b
gboolean
Packit ae235b
g_dbus_is_address (const gchar *string);
Packit ae235b

Checks if string

Packit ae235b
 is a
Packit ae235b
D-Bus address.

Packit ae235b

This doesn't check if string

Packit ae235b
 is actually supported by GDBusServer
Packit ae235b
or GDBusConnection - use g_dbus_is_supported_address() to do more
Packit ae235b
checks.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

string

Packit ae235b

A string.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if string

Packit ae235b
is a valid D-Bus address, FALSE otherwise.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_is_supported_address ()

Packit ae235b
gboolean
Packit ae235b
g_dbus_is_supported_address (const gchar *string,
Packit ae235b
                             GError **error);
Packit ae235b

Like g_dbus_is_address() but also checks if the library supports the

Packit ae235b
transports in string
Packit ae235b
 and that key/value pairs for each transport
Packit ae235b
are valid. See the specification of the
Packit ae235b
D-Bus address format.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

string

Packit ae235b

A string.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

Return location for error or NULL.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if string

Packit ae235b
is a valid D-Bus address that is
Packit ae235b
supported by this library, FALSE if error
Packit ae235b
is set.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_address_get_stream ()

Packit ae235b
void
Packit ae235b
g_dbus_address_get_stream (const gchar *address,
Packit ae235b
                           GCancellable *cancellable,
Packit ae235b
                           GAsyncReadyCallback callback,
Packit ae235b
                           gpointer user_data);
Packit ae235b

Asynchronously connects to an endpoint specified by address

Packit ae235b
 and
Packit ae235b
sets up the connection so it is in a state to run the client-side
Packit ae235b
of the D-Bus authentication conversation. address
Packit ae235b
 must be in the
Packit ae235b
D-Bus address format.

Packit ae235b

When the operation is finished, callback

Packit ae235b
 will be invoked. You can
Packit ae235b
then call g_dbus_address_get_stream_finish() to get the result of
Packit ae235b
the operation.

Packit ae235b

This is an asynchronous failable function. See

Packit ae235b
g_dbus_address_get_stream_sync() for the synchronous version.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

address

Packit ae235b

A valid D-Bus address.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

A GCancellable or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

callback

Packit ae235b

A GAsyncReadyCallback to call when the request is satisfied.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

user_data

Packit ae235b

Data to pass to callback

Packit ae235b
.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_address_get_stream_finish ()

Packit ae235b
GIOStream *
Packit ae235b
g_dbus_address_get_stream_finish (GAsyncResult *res,
Packit ae235b
                                  gchar **out_guid,
Packit ae235b
                                  GError **error);
Packit ae235b

Finishes an operation started with g_dbus_address_get_stream().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

res

Packit ae235b

A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

out_guid

Packit ae235b

NULL or return location to store the GUID extracted from address

Packit ae235b
, if any. 

Packit ae235b
[optional][out]
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

Return location for error or NULL.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

A GIOStream or NULL if error

Packit ae235b
is set. 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_address_get_stream_sync ()

Packit ae235b
GIOStream *
Packit ae235b
g_dbus_address_get_stream_sync (const gchar *address,
Packit ae235b
                                gchar **out_guid,
Packit ae235b
                                GCancellable *cancellable,
Packit ae235b
                                GError **error);
Packit ae235b

Synchronously connects to an endpoint specified by address

Packit ae235b
 and
Packit ae235b
sets up the connection so it is in a state to run the client-side
Packit ae235b
of the D-Bus authentication conversation. address
Packit ae235b
 must be in the
Packit ae235b
D-Bus address format.

Packit ae235b

This is a synchronous failable function. See

Packit ae235b
g_dbus_address_get_stream() for the asynchronous version.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

address

Packit ae235b

A valid D-Bus address.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

out_guid

Packit ae235b

NULL or return location to store the GUID extracted from address

Packit ae235b
, if any. 

Packit ae235b
[optional][out]
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

A GCancellable or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

Return location for error or NULL.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

A GIOStream or NULL if error

Packit ae235b
is set. 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_address_get_for_bus_sync ()

Packit ae235b
gchar *
Packit ae235b
g_dbus_address_get_for_bus_sync (GBusType bus_type,
Packit ae235b
                                 GCancellable *cancellable,
Packit ae235b
                                 GError **error);
Packit ae235b

Synchronously looks up the D-Bus address for the well-known message

Packit ae235b
bus instance specified by bus_type
Packit ae235b
. This may involve using various
Packit ae235b
platform specific mechanisms.

Packit ae235b

The returned address will be in the

Packit ae235b
D-Bus address format.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

bus_type

Packit ae235b

a GBusType

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

a GCancellable or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

return location for error or NULL

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a valid D-Bus address string for bus_type

Packit ae235b
or NULL if
Packit ae235b
error
Packit ae235b
is set

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_address_escape_value ()

Packit ae235b
gchar *
Packit ae235b
g_dbus_address_escape_value (const gchar *string);
Packit ae235b

Escape string

Packit ae235b
 so it can appear in a D-Bus address as the value
Packit ae235b
part of a key-value pair.

Packit ae235b

For instance, if string

Packit ae235b
 is /run/bus-for-:0,
Packit ae235b
this function would return /run/bus-for-%3A0,
Packit ae235b
which could be used in a D-Bus address like
Packit ae235b
unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

string

Packit ae235b

an unescaped string to be included in a D-Bus address

Packit ae235b
as the value in a key-value pair

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a copy of string

Packit ae235b
with all
Packit ae235b
non-optionally-escaped bytes escaped. 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.36

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>