Merge "Serialise events to bson format" into tizen
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 5 Jun 2017 16:43:11 +0000 (16:43 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 5 Jun 2017 16:43:11 +0000 (16:43 +0000)
1  2 
src/core/service.h

index 63ab190dce245d5b53ea9ae146e1239f93a4322e,a527ad353b927bd3d8340075e9270920eb897ec2..d4415e739b2df1461a485dd81c26e02857ec31cb
  #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;
@@@ -35,14 -38,6 +41,15 @@@ int systemd_service_init_by_pid(pid_t p
  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 */