name.h revision 6091827530d6dd43479d6709fb6e9f745c11e900
/*-*- Mode: C; c-basic-offset: 8 -*-*/
#ifndef foonamehfoo
#define foonamehfoo
#include <stdbool.h>
#include <stdlib.h>
#include "job.h"
#include "manager.h"
#include "set.h"
#include "util.h"
#include "list.h"
typedef enum NameType {
NAME_SERVICE = 0,
_NAME_TYPE_INVALID = -1,
} NameType;
typedef enum NameState {
} NameState;
struct Meta {
char **names;
/* Positive dependencies */
Set *required_by; /* inverse of 'requires', 'soft_requires', 'requisite' and 'soft_requisite' is 'required_by' */
/* Negative dependencies */
/* Order */
/* Information */
char *description;
/* If there is something to do with this name, then this is
* the job for it */
bool linked:1;
/* Load queue */
};
typedef enum ServiceState {
} ServiceState;
typedef enum ServiceMode {
} ServiceMode;
struct Service {
};
typedef enum TimerState {
} TimerState;
struct Timer {
};
typedef enum SocketState {
} SocketState;
struct Socket {
int *fds;
unsigned n_fds;
};
typedef enum MilestoneState {
struct Milestone {
};
typedef enum DeviceState {
} DeviceState;
struct Device {
char *sysfs;
};
typedef enum MountState {
} MountState;
struct Mount {
char *path;
};
typedef enum AutomountState {
struct Automount {
char *path;
};
typedef enum SnapshotState {
struct Snapshot {
bool cleanup:1;
};
union Name {
};
/* For casting a name into the various name types */
return NULL; \
\
}
/* For casting the various name types into a name */
NameType name_type_from_string(const char *n);
int name_augment(Name *n);
#endif