temp: all

This commit is contained in:
Stanislav Angelovic
2023-01-21 01:16:51 +01:00
parent 3acd20c2fd
commit 7589ed1d83
113 changed files with 19998 additions and 465 deletions
+29
View File
@@ -0,0 +1,29 @@
# Building doxygen documentation
find_package(Doxygen)
if(BUILD_DOXYGEN_DOC)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
# workaround bug https://github.com/doxygen/doxygen/pull/6787
add_custom_command(TARGET doc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/sdbus-c++-class-diagram.png ${CMAKE_CURRENT_BINARY_DIR}/html/.)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL COMPONENT doc)
else()
message(WARNING "Documentation enabled, but Doxygen cannot be found")
endif()
endif()
install(FILES sdbus-c++-class-diagram.png
sdbus-c++-class-diagram.uml
systemd-dbus-config.md
using-sdbus-c++.md
DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc)
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

+63
View File
@@ -0,0 +1,63 @@
@startuml
package "Public API" <<frame>> #DDDDDD {
interface IConnection {
+requestName()
+enterProcessLoop()
+leaveProcessLoop()
}
interface IObject {
+registerMethod()
+emitSignal()
}
interface IProxy {
+callMethod()
+subscribeToSignal()
+get/setProperty()
}
class Message {
+serialize(...)
+deserialize(...)
+send()
Type msgType
}
}
interface IConnectionInternal {
+addObjectVTable()
+createMethodCall()
+createSignal()
}
class Connection {
}
class Object {
IConnectionInternal& connection
string objectPath
List interfaces
List methods
List signals
List properties
}
class Proxy {
IConnectionInternal& connection
string destination
string objectPath
List signalHandlers
}
IConnection <|-- Connection
IConnectionInternal <|- Connection
IObject <|-- Object
IProxy <|-- Proxy
Connection <-- Object : "use"
Connection <-- Proxy : "use"
Message <.. Object : "send/receive"
Message <.. Proxy : "send/receive"
@enduml
+50
View File
@@ -0,0 +1,50 @@
Systemd and D-Bus configuration
=======================
**Table of contents**
1. [Introduction](#introduction)
2. [Systemd configuration](#systemd-configuration)
3. [Dbus configuration](#dbus-configuration)
Introduction
------------
To run executable as a systemd service you may need some additional setup. For example, you may need explicitly allow the usage of your service. Following chapters contain template configurations.
Systemd configuration
---------------------------------------
Filename should use `.service` extension. It also must be placed in configuration directory (/etc/systemd/system in Ubuntu 18.04.1 LTS)
```
[Unit]
Description=nameOfService
[Service]
ExecStart=/path/to/executable
[Install]
WantedBy=multi-user.target
```
D-Bus configuration
------------------
Typical default D-Bus configuration does not allow to register services except explicitly allowed. To allow a service to register its D-Bus API, we must place an appropriate conf file in `/etc/dbus-1/system.d/` directory. The conf file name must be `<service-name>.conf`. I.e., full file path for Concatenator example from sdbus-c++ tutorial would be `/etc/dbus-1/system.d/org.sdbuscpp.concatenator.conf`. And here is template configuration to use its D-Bus interface under root:
```
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="org.sdbuscpp.concatenator"/>
<allow send_destination="org.sdbuscpp.concatenator"/>
<allow send_interface="org.sdbuscpp.concatenator"/>
</policy>
</busconfig>
```
If you need access from other user then `root` should be substituted by desired username. Or you can simply use policy `<policy context="default">` like [conf file](/tests/integrationtests/files/org.sdbuscpp.integrationtests.conf) for sdbus-c++ integration tests is doing it. For more information refer to `man dbus-daemon`.
File diff suppressed because it is too large Load Diff