25 lines
494 B
C
25 lines
494 B
C
#ifndef SERVICE_H_
|
|
#define SERVICE_H_
|
|
|
|
#include "queue.h"
|
|
enum service_role {
|
|
SVC_ROLE_NONE = 0x00u,
|
|
SVC_ROLE_NAMESPACE_PROVIDER = 0x01u,
|
|
};
|
|
|
|
struct service {
|
|
char *s_name;
|
|
char *s_description;
|
|
char *s_exec;
|
|
enum service_role s_roles;
|
|
struct queue_entry s_entry;
|
|
};
|
|
|
|
extern struct queue *global_services(void);
|
|
|
|
extern int service_load(const char *path, struct service **out);
|
|
extern struct service *service_find(const char *name);
|
|
extern int service_start(struct service *svc);
|
|
|
|
#endif
|