#include <sys/types.h>
#include <unistd.h>
+ #include "common.h"
+
+ #define SYSD_SERVICE "sd_sv"
+ #define SYSD_SERVICE_DBUS_PATH "db_p"
+
+#define FAULTD_SERVICE_TYPE_VIP "org.tizen.faultd.service.VIP"
+#define FAULTD_SERVICE_TYPE_NORMAL NULL
+
struct systemd_service {
char *dbus_path;
char *service_type;
int systemd_service_init(const char *dbus_path, struct systemd_service *s);
void systemd_service_cleanup(struct systemd_service *s);
int systemd_get_unit_by_pid(pid_t pid, const char **name);
+ void systemd_service_serialize(struct systemd_service *s, bson *out);
+static inline int systemd_service_is_of_type(struct systemd_service *s,
+ char *type)
+{
+ if (s->service_type == NULL || type == NULL)
+ return s->service_type == NULL && type == NULL;
+
+ return strcmp(s->service_type, type) == 0;
+}
+
#endif /* FAULTD_SERVICE_H */