QT_ADD_DBUS_INTERFaces
D-Bus 인터페이스 설명 파일에 대한 인터페이스를 구현하는 C++ 소스를 생성합니다.
이 명령은 Qt6
패키지의 DBus
컴포넌트에 정의되어 있습니다. 패키지를 로드합니다:
find_package(Qt6 REQUIRED COMPONENTS DBus)
이 명령은 Qt 6.0에 도입되었습니다.
개요
qt_add_dbus_interfaces(<VAR> dbus_spec1 [dbus_spec2 ...])
버전 없는 명령이 비활성화되어 있으면 qt6_add_dbus_interfaces()
을 대신 사용합니다. 이 명령은 이 명령과 동일한 인수 집합을 지원합니다.
설명
dbus_spec1
, dbus_spec2
에 정의된 D-Bus 인터페이스를 구현하는 C++ 소스를 생성합니다. 여기서 각 인수는 유효한 D-Bus 인터페이스 설명 파일의 경로여야 합니다. 생성된 파일의 경로는 <VAR>
에 추가됩니다.
각 인수에 대해 인터페이스(프록시) 모드에서 Qt D-Bus XML 컴파일러(qdbusxml2cpp )에 대한 호출이 설정됩니다.
생성된 C++ 소스 파일은 XML 파일의 이름을 따서 명명됩니다: org.example.chat.xml
파일의 경우 생성된 헤더의 이름은 orgexamplechatinterface.h
입니다.
옵션
옵션은 각 파일 인수의 set_source_files_properties
을 사용하여 설정할 수 있습니다:
옵션 | 값 | 설명 |
---|---|---|
CLASSNAME | class_name | 기본 인터페이스 클래스 이름을 class_name 로 재정의합니다. |
NO_NAMESPACE | boolean | ON 로 설정된 경우 네임스페이스 이름을 생성하지 않습니다. |
INCLUDE | path | 생성된 코드에 #include "path" 을 추가합니다. |
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.