chiark / gitweb /
implement service type 'finish'
[elogind.git] / automount.h
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3 #ifndef fooautomounthfoo
4 #define fooautomounthfoo
5
6 typedef struct Automount Automount;
7
8 #include "unit.h"
9
10 typedef enum AutomountState {
11         AUTOMOUNT_DEAD,
12         AUTOMOUNT_START_PRE,
13         AUTOMOUNT_START_POST,
14         AUTOMOUNT_WAITING,
15         AUTOMOUNT_RUNNING,
16         AUTOMOUNT_STOP_PRE,
17         AUTOMOUNT_STOP_POST,
18         AUTOMOUNT_MAINTAINANCE,
19         _AUTOMOUNT_STATE_MAX
20 } AutomountState;
21
22 typedef enum AutomountExecCommand {
23         AUTOMOUNT_EXEC_START_PRE,
24         AUTOMOUNT_EXEC_START_POST,
25         AUTOMOUNT_EXEC_STOP_PRE,
26         AUTOMOUNT_EXEC_STOP_POST,
27         _AUTOMOUNT_EXEC_MAX
28 } AutomountExecCommand;
29
30 struct Automount {
31         Meta meta;
32
33         AutomountState state;
34         char *path;
35
36         ExecCommand* exec_command[_AUTOMOUNT_EXEC_MAX];
37         ExecContext exec_context;
38
39         pid_t contol_pid;
40
41         Mount *mount;
42 };
43
44 extern const UnitVTable automount_vtable;
45
46 #endif