INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/${INC_DIR})
INCLUDE(FindPkgConfig)
-pkg_check_modules(rpkgs REQUIRED dlog vconf glib-2.0 libsystemd libusbgx)
+pkg_check_modules(rpkgs REQUIRED dlog vconf glib-2.0 libsystemd libusbgx libgdbus)
FOREACH(flag ${rpkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION})
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
-ADD_LIBRARY(hwcommon SHARED hw/common.c hw/systemd.c hw/usb_client_common.c hw/usb_cfs_client_common.c hw/usb_gadget_common.c)
+ADD_LIBRARY(hwcommon SHARED hw/common.c hw/usb_client_common.c hw/usb_cfs_client_common.c hw/usb_gadget_common.c)
TARGET_LINK_LIBRARIES(hwcommon ${rpkgs_LDFLAGS} "-ldl")
SET_TARGET_PROPERTIES(hwcommon PROPERTIES SOVERSION ${VERSION})
INSTALL(TARGETS hwcommon DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
*/
#include <hw/usb_client.h>
-#include <hw/systemd.h>
#include <hw/shared.h>
#include <limits.h>
#include <usbg/usbg.h>
#include <unistd.h>
-#include <unistd.h>
+#include <libgdbus/dbus-systemd.h>
+
#define zalloc(amount) calloc(1, amount)
if (ret < 0)
return ret;
- ret = systemd_start_socket(socket_name);
+ ret = systemd_start_unit_sync(socket_name, ".socket", -1);
if (ret < 0)
goto umount_ffs;
fws = container_of(usb_func,
struct usb_function_with_service,
func);
- systemd_stop_socket(fws->service);
- systemd_stop_service(fws->service);
+ systemd_stop_unit_sync(fws->service, ".socket", -1);
+ systemd_stop_unit_sync(fws->service, ".service", -1);
}
}
*/
#include <hw/usb_client.h>
-#include <hw/systemd.h>
#include <hw/shared.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
+#include <libgdbus/dbus-systemd.h>
+
#define zalloc(amount) calloc(1, amount)
#define MAX_GADGET_STR_LEN 256
fws = container_of(gadget->funcs[i],
struct usb_function_with_service, func);
- ret = systemd_start_service(fws->service);
+ ret = systemd_start_unit_sync(fws->service, ".service", -1);
if (ret < 0)
goto stop_services;
}
fws = container_of(gadget->funcs[i],
struct usb_function_with_service, func);
- systemd_stop_service(fws->service);
+ systemd_stop_unit_sync(fws->service, ".service", -1);
}
legacy_free_gadget(gadget);
continue;
fws = container_of(gadget->funcs[i], struct usb_function_with_service, func);
- ret = systemd_stop_service(fws->service);
+ ret = systemd_stop_unit_sync(fws->service, ".service", -1);
if (ret < 0)
goto free_gadget;
}
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0)
-BuildRequires: pkgconfig(gmock)
-BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: pkgconfig(libsystemd)
-BuildRequires: pkgconfig(libusbgx)
+BuildRequires: pkgconfig(gmock)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(libsystemd)
+BuildRequires: pkgconfig(libusbgx)
+BuildRequires: pkgconfig(libgdbus)
%description
development package of library to control OAL APIs
%package devel
-Summary: Control OAL APIs (devel)
-Requires: %{name} = %{version}-%{release}
+Summary: Control OAL APIs (devel)
+Requires: %{name} = %{version}-%{release}
%description devel
Library to control OAL APIs (devel)
%package -n device-haltests
-Summary: Device HAL(Hardware Abstraction Layer) Test Cases
-Requires: %{name} = %{version}-%{release}
+Summary: Device HAL(Hardware Abstraction Layer) Test Cases
+Requires: %{name} = %{version}-%{release}
%description -n device-haltests
Device HAL(Hardware Abstraction Layer) Test Cases