# class DBusExportModel

###

Module | soprano
Namespace | Soprano::Server
Class | DBusExportModel
Inherits | Soprano::FilterModel

\class DBusExportModel dbusexportmodel.h Soprano/Server/DBusExportModel

Exports a %Soprano Model via D-Bus.

DBusExportModel is a FilterModel like any other. As such, it can occure anywhere in a stack of models. However, the model exported via D-Bus is actually the FilterModel.parentModel, not the DBusExportModel itself. Thus, subclassing DBusExportModel to modify the behaviour of methods called via D-Bus does not make sense. Instead stack the DBusExportModel on top of your own custom FilterModel.

For creating a simple %Soprano D-Bus server see ServerCore.registerAsDBusObject.

The interface exported can be accessed via Client.DBusModel.

DBusExportModel automatically makes use of a Util.AsyncModel as parent model to create delayed D-Bus replies. If the parent model is not a Util.AsyncModel all calls will be performed syncroneously.

Author Sebastian Trueg <trueg@kde.org>

See also soprano_server_dbus

\since 2.1

### methods

- DBusExportModel (model)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  model | Soprano.Model | 0

  Create a new D-Bus export model.

  model - The parent model which should be exported.

- dbusObjectPath ( )

  returns QString

  The path this model is exported on. This is an empty string if the model is not exported.

- registerModel (dbusObjectPath)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  dbusObjectPath | QString |

  Register the model under the given D-Bus object path.

  See also QDBusConnection.registerObject

- unregisterModel ( )

  returns Nothing

  Unregister the model from D-Bus.

  See also QDBusConnection.unregisterObject