## GDBusInterface

GDBusInterface — Base type for D-Bus interfaces

## Synopsis

    #include <gio/gio.h>

                        GDBusInterface;
    struct              GDBusInterfaceIface;
    GDBusInterfaceInfo * g_dbus_interface_get_info          (GDBusInterface *interface_);
    GDBusObject *       g_dbus_interface_get_object         (GDBusInterface *interface_);
    void                g_dbus_interface_set_object         (GDBusInterface *interface_,
                                                             GDBusObject *object);

## Object Hierarchy

      GInterface
       +----GDBusInterface

## Prerequisites

GDBusInterface requires GObject.

## Known Implementations

GDBusInterface is implemented by GDBusInterfaceSkeleton and GDBusProxy.

## Description

The GDBusInterface type is the base type for D-Bus interfaces both on the service side (see GDBusInterfaceSkeleton) and client side (see GDBusProxy).

## Details

### GDBusInterface

    typedef struct _GDBusInterface GDBusInterface;

Base type for D-Bus interfaces.

Since 2.30

### struct GDBusInterfaceIface

    struct GDBusInterfaceIface {
      GTypeInterface parent_iface;

      /* Virtual Functions */
      GDBusInterfaceInfo   *(*get_info)   (GDBusInterface      *interface_);
      GDBusObject          *(*get_object) (GDBusInterface      *interface_);
      void                  (*set_object) (GDBusInterface      *interface_,
                                           GDBusObject         *object);
    };

Base type for D-Bus interfaces.

GTypeInterface `parent_iface`; | The parent interface.
`get_info` () | Returns a GDBusInterfaceInfo. See `g_dbus_interface_get_info()`.
`get_object` () | Gets the enclosing GDBusObject. See `g_dbus_interface_get_object()`.
`set_object` () | Sets the enclosing GDBusObject. See `g_dbus_interface_set_object()`.

Since 2.30

### g_dbus_interface_get_info ()

    GDBusInterfaceInfo * g_dbus_interface_get_info          (GDBusInterface *interface_);

Gets D-Bus introspection information for the D-Bus interface implemented by `interface_`.

`interface_` : | An exported D-Bus interface.
Returns : | A GDBusInterfaceInfo. Do not free. [transfer none]

Since 2.30

### g_dbus_interface_get_object ()

    GDBusObject *       g_dbus_interface_get_object         (GDBusInterface *interface_);

Gets the GDBusObject that `interface_` belongs to, if any.

`interface_` : | An exported D-Bus interface.
Returns : | A GDBusObject or `NULL`. The returned reference belongs to `interface_` and should not be freed. [transfer none]

Since 2.30

### g_dbus_interface_set_object ()

    void                g_dbus_interface_set_object         (GDBusInterface *interface_,
                                                             GDBusObject *object);

Sets the GDBusObject for `interface_` to `object`.

Note that `interface_` will hold a weak reference to `object`.

`interface_` : | An exported D-Bus interface.
`object` : | A GDBusObject or `NULL`.

Since 2.30