summaryrefslogtreecommitdiff
path: root/src/session.mli
blob: dfe29676b9568f6fe435bbbebf533abd4b3e806a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
type cfg_op =
    | CfgSet of string list * string option * Config_tree.value_behaviour
    | CfgDelete of string list * string option

type world = {
    running_config: Config_tree.t;
    reference_tree: Reference_tree.t;
    vyconf_config: Vyconf_config.t;
    dirs: Directories.t
}

type session_data = {
    proposed_config : Config_tree.t;
    modified: bool;
    conf_mode: bool;
    changeset: cfg_op list;
    client_app: string;
    user: string
}

exception Session_error of string

val make : world -> string -> string -> session_data

val set : world -> session_data -> string list -> session_data

val delete : world -> session_data -> string list -> session_data

val get_value : world -> session_data -> string list -> string

val get_values : world -> session_data -> string list -> string list

val exists : world -> session_data -> string list -> bool

val string_of_op : cfg_op -> string