# Gio::DBus::Address Namespace Reference

## Functions

bool | is_address (const Glib::ustring&string)
| Checks if string is a D-Bus address.
bool | is_supported (const Glib::ustring& address)
| Like is_address() but also checks if the library supports the transports in address and that key/value pairs for each transport are valid.
void | get_stream (const Glib::ustring& address, const SlotAsyncReady slot, const Glib::RefPtr< Cancellable >& cancellable)
| Asynchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.
void | get_stream (const Glib::ustring& address, const SlotAsyncReady slot)
| A non-cancellable version of get_stream().
Glib::RefPtr< IOStream > | get_stream_finish (const Glib::RefPtr< AsyncResult >& res, Glib::ustring& out_guid)
| Finishes an operation started with get_stream().
Glib::RefPtr< IOStream > | get_stream_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes an operation started with get_stream().
Glib::RefPtr< IOStream > | get_stream_sync (const Glib::ustring& address, const Glib::RefPtr< Cancellable >& cancellable, Glib::ustring& out_guid)
| Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.
Glib::RefPtr< IOStream > | get_stream_sync (const Glib::ustring& address, Glib::ustring& out_guid)
| A non-cancellable version of get_stream_sync().
Glib::RefPtr< IOStream > | get_stream_sync (const Glib::ustring& address, const Glib::RefPtr< Cancellable >& cancellable)
| Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.
Glib::RefPtr< IOStream > | get_stream_sync (const Glib::ustring& address)
| A non-cancellable version of get_stream_sync().
Glib::ustring | get_for_bus_sync (BusType bus_type, const Glib::RefPtr< Cancellable >& cancellable)
| Synchronously looks up the D-Bus address for the well-known message bus instance specified by bus_type.
Glib::ustring | get_for_bus_sync (BusType bus_type)
| A non-cancellable get_for_bus_sync().

## Function Documentation

Glib::ustring Gio::DBus::Address::get_for_bus_sync | ( | BusType | bus_type,
|  | const Glib::RefPtr< Cancellable >& | cancellable |
| ) |  |  |

Synchronously looks up the D-Bus address for the well-known message bus instance specified by bus_type.

This may involve using various platform specific mechanisms.

Parameters:

  | bus_type | A BusType.
  | cancellable | A Cancellable.

Returns:
  A valid D-Bus address string for bus_type.

Exceptions:

  | Glib::Error. |

Since glibmm 2.28:

Glib::ustring Gio::DBus::Address::get_for_bus_sync | ( | BusType | bus_type | ) |

A non-cancellable get_for_bus_sync().

void Gio::DBus::Address::get_stream | ( | const Glib::ustring& | address,
|  | const SlotAsyncReady | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable |
| ) |  |  |

Asynchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.

When the operation is finished, slot will be invoked. You can then call get_stream_finish() to get the result of the operation.

This is an asynchronous failable function. See get_stream_sync() for the synchronous version.

Parameters:

  | address | A valid D-Bus address.
  | cancellable | A Cancellable.
  | slot | A SlotAsyncReady to call when the request is satisfied.

Since glibmm 2.28:

void Gio::DBus::Address::get_stream | ( | const Glib::ustring& | address,
|  | const SlotAsyncReady | slot |
| ) |  |  |

A non-cancellable version of get_stream().

Glib::RefPtr<IOStream> Gio::DBus::Address::get_stream_finish | ( | const Glib::RefPtr< AsyncResult >& | res,
|  | Glib::ustring& | out_guid |
| ) |  |  |

Finishes an operation started with get_stream().

Parameters:

  | res | A AsyncResult obtained from the SlotAsyncReady passed to get_stream().
  | out_guid | Return location to store the GUID extracted from address, if any.

Returns:
  A IOStream.

Exceptions:

  | Glib::Error. |

Since glibmm 2.28:

Glib::RefPtr<IOStream> Gio::DBus::Address::get_stream_finish | ( | const Glib::RefPtr< AsyncResult >& | res | ) |

Finishes an operation started with get_stream().

Parameters:

  | res | A AsyncResult obtained from the SlotAsyncReady passed to get_stream().

Returns:
  A IOStream.

Exceptions:

  | Glib::Error. |

Since glibmm 2.28:

Glib::RefPtr<IOStream> Gio::DBus::Address::get_stream_sync | ( | const Glib::ustring& | address,
|  | const Glib::RefPtr< Cancellable >& | cancellable |
| ) |  |  |

Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.

This is a synchronous failable function. See get_stream() for the asynchronous version.

Parameters:

  | address | A valid D-Bus address.
  | cancellable | A Cancellable.
  | Returns | A IOStream.

Exceptions:

  | Glib::Error. |

Since glibmm 2.28:

Glib::RefPtr<IOStream> Gio::DBus::Address::get_stream_sync | ( | const Glib::ustring& | address,
|  | Glib::ustring& | out_guid |
| ) |  |  |

A non-cancellable version of get_stream_sync().

Glib::RefPtr<IOStream> Gio::DBus::Address::get_stream_sync | ( | const Glib::ustring& | address | ) |

A non-cancellable version of get_stream_sync().

Glib::RefPtr<IOStream> Gio::DBus::Address::get_stream_sync | ( | const Glib::ustring& | address,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | Glib::ustring& | out_guid |
| ) |  |  |

Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.

This is a synchronous failable function. See get_stream() for the asynchronous version.

Parameters:

  | address | A valid D-Bus address.
  | out_guid | A return location to store the GUID extracted from address, if any.
  | cancellable | A Cancellable.
  | Returns | A IOStream.

Exceptions:

  | Glib::Error. |

Since glibmm 2.28:

bool Gio::DBus::Address::is_address | ( | const Glib::ustring& | string | ) |

Checks if string is a D-Bus address.

This doesn't check if string is actually supported by BusServer or BusConnection - use is_supported_address() to do more checks.

Parameters:

  | string | A string.

Returns:
  `true` if string is a valid D-Bus address, `false` otherwise.

Since glibmm 2.28:

bool Gio::DBus::Address::is_supported | ( | const Glib::ustring& | address | ) |

Like is_address() but also checks if the library supports the transports in address and that key/value pairs for each transport are valid.

Parameters:

  | address | A supposed address.

Returns:
  `true</t> if address is a valid D-Bus address that is supported by this library, `false` otherwise.`

Exceptions:

  | Glib::Error. | ``

Since glibmm 2.28:
  ``