summaryrefslogtreecommitdiff
path: root/src/session.mli
blob: 299f2cac8c523393174316496ad26ee1de8cd310 (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
36
37
38
39
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 list_children : world -> session_data -> string list -> string list

val string_of_op : cfg_op -> string

val show_config : world -> session_data -> string list -> Vyconf_types.request_config_format -> string