org.freedesktop.Hostname1

org.freedesktop.Hostname1 — Hostname1 interface

Methods

SetDisplayHostname              (in  's' display_hostname)
SetHostname                     (in  's' hostname)
SetIconName                     (in  's' icon_name)
SetUseTransientData             (in  'b' use_transient_data)
RegisterTransientDataProvider   (out 's' cookie)
UnregisterTransientDataProvider (in  's' cookie)
SetTransientDisplayHostname     (in  's' cookie,
                                 in  's' display_hostname)
SetTransientHostname            (in  's' cookie,
                                 in  's' hostname)
SetTransientIconName            (in  's' cookie,
                                 in  's' icon_name)

Signals

Changed ()

Implemented Interfaces

Objects implementing org.freedesktop.Hostname1 also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

Properties

'display-hostname'            read      's'
'hostname'                    read      's'
'icon-name'                   read      's'
'configured-display-hostname' read      's'
'configured-hostname'         read      's'
'configured-icon-name'        read      's'
'use-transient-data'          read      'b'
'transient-display-hostname'  read      's'
'transient-hostname'          read      's'
'transient-icon-name'         read      's'

Description

This interface is usually implemented by the object /org/freedesktop/hostname1 exported by a system D-Bus service with the well-known name org.freedesktop.Hostname1.

Details

SetDisplayHostname ()

SetDisplayHostname (in  's' display_hostname)

Sets the configured-display-hostname property. Typically only user interface applications will call this method in response to an user initiated action.

display_hostname:

The value for the display host name. The passed in value is subject to the same format and limitations as the display-hostname property.

Errors

org.freedesktop.Hostname1.Error.PermissionDenied:

if the caller is not authorized

org.freedesktop.Hostname1.Error.InvalidData:

if invalid data is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.hostname1.change:


SetHostname ()

SetHostname (in  's' hostname)

Sets the configured-hostname property. Typically only user interface applications will call this method in response to an user initiated action.

hostname:

The value for the host name. The passed in value is subject to the same format and limitations as the hostname property.

Errors

org.freedesktop.Hostname1.Error.PermissionDenied:

if the caller is not authorized

org.freedesktop.Hostname1.Error.InvalidData:

if invalid data is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.hostname1.change:


SetIconName ()

SetIconName (in  's' icon_name)

Sets the configured-icon-name property. Typically only user interface applications will call this method in response to an user initiated action.

icon_name:

The name for the host icon. The passed in value is subject to the same format and limitations as the icon-name property.

Errors

org.freedesktop.Hostname1.Error.PermissionDenied:

if the caller is not authorized

org.freedesktop.Hostname1.Error.InvalidData:

if invalid data is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.hostname1.change:


SetUseTransientData ()

SetUseTransientData (in  'b' use_transient_data)

Sets the use-transient-data property. Typically only user interface applications will call this method in response to an user initiated action.

use_transient_data:

Whether transient data should be used if available. See the use-transient property for details.

Errors

org.freedesktop.Hostname1.Error.PermissionDenied:

if the caller is not authorized

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.hostname1.change:


RegisterTransientDataProvider ()

RegisterTransientDataProvider (out 's' cookie)

Registers a provider for transient hostname data. A cookie is returned that the provider can use for invoking methods like SetTransientHostname() to set transient data. The data is kept in memory and will be purged when the provider calls UnregisterTransientDataProvider() or disconnects from the system message bus. Only a single client can provide transient hostname data at a time. Typically only network configuration tools will need to call this method.

cookie:

A cookie to be used for providing transient data via methods such as SetTransientHostname() and to unregister as a transient data provider via the UnregisterTransientDataProvider() method.

Errors

org.freedesktop.Hostname1.Error.HasTransientDataProvider:

if another client has already registered for providing transient data

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

Only the super user (uid 0) can invoke this method.


UnregisterTransientDataProvider ()

UnregisterTransientDataProvider (in  's' cookie)

Unregisters a transient data provider previously registered with RegisterTransientDataProvider().

cookie:

A cookie obtained from the RegisterTransientDataProvider() method.

Errors

org.freedesktop.Hostname1.Error.InvalidData:

if an invalid cookie is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

Only the super user (uid 0) can invoke this method.


SetTransientDisplayHostname ()

SetTransientDisplayHostname (in  's' cookie,
                             in  's' display_hostname)

Sets the transient-display-hostname property. Typically only network configuration tools will need to call this method.

cookie:

A cookie obtained from the RegisterTransientDataProvider() method.

display_hostname:

The value for the display host name. Any valid UTF-8 string can be used.

Errors

org.freedesktop.Hostname1.Error.InvalidData:

if invalid data is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

Only the super user (uid 0) can invoke this method.


SetTransientHostname ()

SetTransientHostname (in  's' cookie,
                      in  's' hostname)

Sets the transient-hostname property. Typically only network configuration tools will need to call this method.

cookie:

A cookie obtained from the RegisterTransientDataProvider() method.

hostname:

The value for the host name. Can't be an empty string. Must conform to limitations and constraints as described for the hostname property.

Errors

org.freedesktop.Hostname1.Error.InvalidData:

if invalid data is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

Only the super user (uid 0) can invoke this method.


SetTransientIconName ()

SetTransientIconName (in  's' cookie,
                      in  's' icon_name)

Sets the transient-icon-name property. Typically only network configuration tools will need to call this method.

cookie:

A cookie obtained from the RegisterTransientDataProvider() method.

icon_name:

The name for the host icon. Must be an empty string to unset the icon, otherwise a themed icon name conforming to the freedesktop.org Icon Theme Specification and Icon Naming Specification specifications.

Errors

org.freedesktop.Hostname1.Error.InvalidData:

if invalid data is passed

org.freedesktop.Hostname1.Error.Failed:

if the operation failed

Permissions

Only the super user (uid 0) can invoke this method.

Signal Details

The Changed signal

Changed ()

Emitted when one or more properties change.

Property Details

The "display-hostname" property

'display-hostname'  read      's'

The display hostname of the system. If empty, it means no display hostname has been chosen for the system.


The "hostname" property

'hostname'  read      's'

The hostname of the system. Is never the empty string. Conforms to section 3.5 of RFC 1034 with the hostname being a label: 7 bit ASCII without special characters, whitespace or dots.


The "icon-name" property

'icon-name'  read      's'

The name icon to use for the system. Is either an empty string if no icon is set, otherwise a themed icon name conforming to the freedesktop.org Icon Theme Specification and Icon Naming Specification specifications.


The "configured-display-hostname" property

'configured-display-hostname'  read      's'

The configured display hostname of the system. This is a user preference and can be changed with the SetDisplayHostname() method. This property is subject to the same format and limitations as the display-hostname property.


The "configured-hostname" property

'configured-hostname'  read      's'

The configured hostname of the system. This is a user preference and can be changed with the SetHostname() method. This property is subject to the same format and limitations as the hostname property.


The "configured-icon-name" property

'configured-icon-name'  read      's'

The configured icon name of the system. This is a user preference and can be changed with the SetIconName() method. This property is subject to the same format and limitations as the icon-name property.


The "use-transient-data" property

'use-transient-data'  read      'b'

If FALSE, then transient data will be ignored when computing the value of the hostname, display-hostname and icon-name properties. This is a user preference and can be changed with the SetUseTransientData() method.


The "transient-display-hostname" property

'transient-display-hostname'  read      's'

If not blank, the display hostname currently provided by a registered transient data provider. This property is subject to the same format and limitations as the display-hostname property.


The "transient-hostname" property

'transient-hostname'  read      's'

If not blank, the hostname currently provided by a registered transient data provider. This property is subject to the same format and limitations as the hostname property.


The "transient-icon-name" property

'transient-icon-name'  read      's'

If not blank, the icon name currently provided by a registered transient data provider. This property is subject to the same format and limitations as the icon-name property.