chiark / gitweb /
core: rename SystemdRunningAs to ManagerRunningAs
[elogind.git] / src / shared / path-lookup.h
index b8a0aace83ad8c0a83e78a1c98233de9f5969d4b..31b2df3c145400dc78f52cc4f6b21ab98c5fb3b6 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "macro.h"
 
+typedef enum UnitFileScope UnitFileScope;
+
 typedef struct LookupPaths {
         char **unit_path;
 #ifdef HAVE_SYSV_COMPAT
@@ -31,23 +33,28 @@ typedef struct LookupPaths {
 #endif
 } LookupPaths;
 
-typedef enum SystemdRunningAs {
-        SYSTEMD_SYSTEM,
-        SYSTEMD_USER,
-        _SYSTEMD_RUNNING_AS_MAX,
-        _SYSTEMD_RUNNING_AS_INVALID = -1
-} SystemdRunningAs;
+typedef enum ManagerRunningAs {
+        MANAGER_SYSTEM,
+        MANAGER_USER,
+        _MANAGER_RUNNING_AS_MAX,
+        _MANAGER_RUNNING_AS_INVALID = -1
+} ManagerRunningAs;
 
 int user_config_home(char **config_home);
 int user_runtime_dir(char **runtime_dir);
 
+char **generator_paths(ManagerRunningAs running_as);
+
 int lookup_paths_init(LookupPaths *p,
-                      SystemdRunningAs running_as,
+                      ManagerRunningAs running_as,
                       bool personal,
                       const char *root_dir,
                       const char *generator,
                       const char *generator_early,
                       const char *generator_late);
 void lookup_paths_free(LookupPaths *p);
+int lookup_paths_init_from_scope(LookupPaths *paths,
+                                 UnitFileScope scope,
+                                 const char *root_dir);
 
 #define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)