]>
git.ipfire.org Git - thirdparty/systemd.git/blob - manager.h
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
10 typedef struct Manager Manager
;
19 uint32_t current_job_id
;
21 /* Note that the set of names we know of is allowed to be
22 * incosistent. However the subset of it that is loaded may
23 * not, and the list of jobs may neither. */
25 /* Active jobs and names */
26 Hashmap
*names
; /* name string => Name object n:1 */
27 Hashmap
*jobs
; /* job id => Job object 1:1 */
29 /* Names that need to be loaded */
30 LIST_HEAD(Meta
, load_queue
); /* this is actually more a stack than a queue, but uh. */
32 /* Jobs to be added */
33 Hashmap
*transaction_jobs
; /* Name object => Job object list 1:1 */
34 JobDependency
*transaction_anchor
;
36 bool dispatching_load_queue
:1;
39 Manager
* manager_new(void);
40 void manager_free(Manager
*m
);
42 Job
*manager_get_job(Manager
*m
, uint32_t id
);
43 Name
*manager_get_name(Manager
*m
, const char *name
);
45 int manager_load_name(Manager
*m
, const char *name
, Name
**_ret
);
46 int manager_add_job(Manager
*m
, JobType type
, Name
*name
, JobMode mode
, bool force
, Job
**_ret
);
48 void manager_dump_names(Manager
*s
, FILE *f
);
49 void manager_dump_jobs(Manager
*s
, FILE *f
);
51 void manager_transaction_delete_job(Manager
*m
, Job
*j
);