feat: watch systemd unit new and remove to sync state
add default values to XDG_DATA_DIRS if it dosen't set Signed-off-by: ComixHe <heyuming@deepin.org> Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
@ -6,5 +6,9 @@ target_link_libraries(${APP_LAUNCH_HELPER_BIN} PRIVATE
|
||||
PkgConfig::SYSTEMD
|
||||
)
|
||||
|
||||
target_include_directories(${APP_LAUNCH_HELPER_BIN} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS ${APP_LAUNCH_HELPER_BIN} DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/deepin/application-manager/)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
#include <thread>
|
||||
#include "constant.h"
|
||||
|
||||
enum class ExitCode { SystemdError = -3, InvalidInput = -2, InternalError = -1, Done = 0, Waiting = 1 };
|
||||
|
||||
@ -25,10 +26,6 @@ struct JobRemoveResult
|
||||
ExitCode result{ExitCode::Waiting};
|
||||
};
|
||||
|
||||
constexpr static auto SystemdService = "org.freedesktop.systemd1";
|
||||
constexpr static auto SystemdObjectPath = "/org/freedesktop/systemd1";
|
||||
constexpr static auto SystemdInterfaceName = "org.freedesktop.systemd1.Manager";
|
||||
|
||||
using msg_ptr = sd_bus_message *;
|
||||
using bus_ptr = sd_bus *;
|
||||
|
||||
|
Reference in New Issue
Block a user