IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

qt_add_dbus_interface

Generates C++ sources implementing an interface for a D-Bus interface description file.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

qt_add_dbus_interface

Generates C++ sources implementing an interface for a D-Bus interface description file.

The command is defined in the DBus component of the Qt6 package. Load the package with:

 
Sélectionnez
find_package(Qt6 REQUIRED COMPONENTS DBus)

This command was introduced in Qt 6.0.

Synopsis

 
Sélectionnez
qt_add_dbus_interface(<VAR> dbus_spec basename)

If versionless commands are disabled, use qt6_add_dbus_interface() instead. It supports the same set of arguments as this command.

Description

Generates C++ sources implementing an interface for a D-Bus interface description file defined in dbus_spec. The generated files are named after basename: basename.h, basename.cpp, basename.moc. The paths of the files are added to <VAR>.

The function sets up a call to the Qt D-Bus XML compiler (qdbusxml2cpp) in interface (proxy) mode. By default, qdbusxml2cpp generates a C++ class named after the interface name, with a namespaced alias:

D-Bus Interface Name

Class name

Namespaced name

org.example.chat

OrgExampleChatInterface

org.example.chat

Options

Options can be set using set_source_files_properties on the dbus_spec:

Option

Value

Description

CLASSNAME

class_name

Override the default interface class name with class_name.

NO_NAMESPACE

boolean

Do not generate the namespaced name if set to ON.

INCLUDE

path

Add an #include "path" in the generated code.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+