Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
crinit-client.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
6#ifndef __CRINIT_CLIENT_H__
7#define __CRINIT_CLIENT_H__
8
9#include <bits/types/FILE.h>
10#include <sched.h>
11#include <stdarg.h>
12#include <stdbool.h>
13
14#include "crinit-sdefs.h"
15#include "version.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
30void crinitClientSetErrStream(FILE *errStream);
40void crinitClientSetInfoStream(FILE *infoStream);
41
61
69void crinitClientSetNotifyTaskName(const char *taskName);
77void crinitClientSetSocketPath(const char *sockFile);
85int crinitClientSetVerbose(bool v);
86
106int sd_notify(int unset_environment, const char *state); // NOLINT(readability-identifier-naming)
107 // Rationale: Naming determined by external API.
113int sd_notifyf(int unset_environment, const char *format, ...); // NOLINT(readability-identifier-naming)
114 // Rationale: Naming determined by external API.
115
139int crinitClientTaskAdd(const char *configFilePath, bool overwrite, const char *forceDeps);
157int crinitClientSeriesAdd(const char *seriesFilePath, bool overwriteTasks);
158
169int crinitClientTaskEnable(const char *taskName);
182int crinitClientTaskDisable(const char *taskName);
194int crinitClientTaskStop(const char *taskName);
205int crinitClientTaskKill(const char *taskName);
220int crinitClientTaskRestart(const char *taskName);
239int crinitClientTaskGetStatus(crinitTaskState_t *s, pid_t *pid, struct timespec *ct, struct timespec *st,
240 struct timespec *et, gid_t *gid, uid_t *uid, char **username, char **groupname,
241 const char *taskName);
272
273#ifdef __cplusplus
274}
275#endif
276
277#endif /* __CRINIT_CLIENT_H__ */
int crinitClientTaskDisable(const char *taskName)
Definition crinit-client.c:247
void crinitClientSetErrStream(FILE *errStream)
Definition crinit-client.c:83
void crinitClientSetSocketPath(const char *sockFile)
Definition crinit-client.c:97
int crinitClientTaskAdd(const char *configFilePath, bool overwrite, const char *forceDeps)
Definition crinit-client.c:164
int crinitClientGetVersion(crinitVersion_t *v)
Definition crinit-client.c:600
int sd_notify(int unset_environment, const char *state)
Definition crinit-client.c:107
void crinitClientFreeTaskList(crinitTaskList_t *tl)
Definition crinit-client.c:566
int crinitClientSetVerbose(bool v)
Definition crinit-client.c:79
int crinitClientTaskEnable(const char *taskName)
Definition crinit-client.c:223
int crinitClientTaskStop(const char *taskName)
Definition crinit-client.c:270
int crinitClientGetTaskList(crinitTaskList_t **tl)
Definition crinit-client.c:478
void crinitClientSetNotifyTaskName(const char *taskName)
Definition crinit-client.c:91
int crinitClientSeriesAdd(const char *seriesFilePath, bool overwriteTasks)
Definition crinit-client.c:197
int crinitClientTaskKill(const char *taskName)
Definition crinit-client.c:294
int sd_notifyf(int unset_environment, const char *format,...)
Definition crinit-client.c:136
const crinitVersion_t * crinitClientLibGetVersion(void)
Definition crinit-client.c:103
void crinitClientSetInfoStream(FILE *infoStream)
Definition crinit-client.c:87
int crinitClientTaskGetStatus(crinitTaskState_t *s, pid_t *pid, struct timespec *ct, struct timespec *st, struct timespec *et, gid_t *gid, uid_t *uid, char **username, char **groupname, const char *taskName)
Definition crinit-client.c:342
int crinitClientTaskRestart(const char *taskName)
Definition crinit-client.c:318
int crinitClientShutdown(crinitShutdownCmd_t sCmd)
Definition crinit-client.c:579
Definitions shared between crinit's public and internal APIs.
crinitShutdownCmd_t
Definition crinit-sdefs.h:43
unsigned long crinitTaskState_t
Type to store Task state bitmask.
Definition crinit-sdefs.h:14
Definition crinit-sdefs.h:37
Definition version.h:19
Header definitions related to component versioning.