.TH "Eliom_state.Ext" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_state.Ext \- no description .SH Module Module Eliom_state.Ext .SH Documentation .sp Module .BI "Ext" : .B sig end .sp .sp .sp .sp .I exception Wrong_scope .sp Exception raised when you try to access a reference belonging to a scope different to the state\&'s scope .sp .sp .I type timeout = | TGlobal (* see global setting *) | TNone (* explicitly set no timeout *) | TSome .B of .B float .sp Type used to describe session timeouts .sp .sp .PP .B === timeout duration in seconds === .PP .I type service_cookie_info .sp These types are used to get or set information about browser or process cookies (like timeouts)\&. .sp .sp .I type data_cookie_info .sp .sp .I type persistent_cookie_info .sp .sp .I type .B (+'a, +'b) .I state .sp The type of states\&. The first parameter corresponds to the scope level and the second one to the kind of state (volatile or persistent data, or service state) .sp .sp .I val volatile_data_group_state : .B ?scope:Eliom_common.session_group_scope -> .B string -> ([> `Session_group ], [> `Data ]) state .sp .B volatile_data_group_state ~scope n returns the state corresponding to the group named .B n in scope .B scope \&. .sp .sp .I val persistent_data_group_state : .B ?scope:Eliom_common.session_group_scope -> .B string -> ([> `Session_group ], [> `Pers ]) state .sp Same for persistent data .sp .sp .I val service_group_state : .B ?scope:Eliom_common.session_group_scope -> .B string -> ([> `Session_group ], [> `Service ]) state .sp Same for services .sp .sp .I val current_volatile_session_state : .B ?secure:bool -> .B ?scope:Eliom_common.session_scope -> .B unit -> ([< `Session ], [< `Data ]) state .sp .B current_volatile_session_state ~scope returns the state corresponding to current session in scope .B scope \&. .sp .sp .I val current_persistent_session_state : .B ?secure:bool -> .B ?scope:Eliom_common.session_scope -> .B unit -> ([< `Session ], [< `Pers ]) state Lwt.t .sp Same for persistent data .sp .sp .I val current_service_session_state : .B ?secure:bool -> .B ?scope:Eliom_common.session_scope -> .B unit -> ([< `Session ], [< `Service ]) state .sp Same for services .sp .sp .I val discard_state : .B state:('a, 'b) state -> unit Lwt.t .sp Discard external states .sp .sp .I val fold_volatile_sub_states : .B ?sitedata:Eliom_common.sitedata -> .B state:([< `Session | `Session_group ], [< `Data | `Service ] as 'k) .B state -> .B ('a -> ([< `Client_process | `Session ], 'k) state -> 'a) -> .B 'a -> 'a .sp Fold all sessions in a groups, or all client processes in a session\&. If you do not call the function during a request or during the initialisation phase of the Eliom module, you must provide the extra parameter .B ?sitedata , that you can get by calling .B Eliom_request_info\&.get_sitedata during the initialisation phase of the Eliom module\&. .sp .sp .I val iter_volatile_sub_states : .B ?sitedata:Eliom_common.sitedata -> .B state:([< `Session | `Session_group ], [< `Data | `Service ] as 'k) .B state -> .B (([< `Client_process | `Session ], 'k) state -> unit) -> unit .sp Iter on all sessions in a groups, or all client processes in a session\&. See .B Eliom_state\&.Ext\&.fold_volatile_sub_states for explanation about the .B ?sitedata parameter\&. .sp .sp .I val fold_sub_states : .B ?sitedata:Eliom_common.sitedata -> .B state:([< `Session | `Session_group ], [< `Data | `Pers | `Service ] as 'k) .B state -> .B ('a -> .B ([< `Client_process | `Session ], 'k) state -> 'a Lwt.t) -> .B 'a -> 'a Lwt.t .sp Fold all sessions in a groups, or all client processes in a session\&. See .B Eliom_state\&.Ext\&.fold_volatile_sub_states for explanation about the .B ?sitedata parameter\&. .sp .sp .I val iter_sub_states : .B ?sitedata:Eliom_common.sitedata -> .B state:([< `Session | `Session_group ], 'k) state -> .B (([< `Client_process | `Session ], 'k) state -> unit Lwt.t) -> .B unit Lwt.t .sp Iter on all sessions in a groups, or all client processes in a session\&. See .B Eliom_state\&.Ext\&.fold_volatile_sub_states for explanation about the .B ?sitedata parameter\&. .sp .sp .I module Low_level : .B sig end .sp .sp .I val get_service_cookie_info : .B ([< Eliom_common.cookie_level ], [ `Service ]) state -> .B service_cookie_info .sp Get the infomration about cookies (timeouts, etc\&.) .sp .sp .I val get_volatile_data_cookie_info : .B ([< Eliom_common.cookie_level ], [ `Data ]) state -> .B data_cookie_info .sp .sp .I val get_persistent_cookie_info : .B ([< Eliom_common.cookie_level ], [ `Pers ]) state -> .B persistent_cookie_info Lwt.t .sp .sp .I val get_service_cookie_scope : .B cookie:service_cookie_info -> Eliom_common.user_scope .sp .sp .I val get_volatile_data_cookie_scope : .B cookie:data_cookie_info -> Eliom_common.user_scope .sp .sp .I val get_persistent_data_cookie_scope : .B cookie:persistent_cookie_info -> Eliom_common.user_scope .sp .sp .I val set_service_cookie_timeout : .B cookie:service_cookie_info -> float option -> unit .sp .sp .I val set_volatile_data_cookie_timeout : .B cookie:data_cookie_info -> float option -> unit .sp .sp .I val set_persistent_data_cookie_timeout : .B cookie:persistent_cookie_info -> float option -> unit Lwt.t .sp .sp .I val get_service_cookie_timeout : .B cookie:service_cookie_info -> timeout .sp .sp .I val get_volatile_data_cookie_timeout : .B cookie:data_cookie_info -> timeout .sp .sp .I val get_persistent_data_cookie_timeout : .B cookie:persistent_cookie_info -> timeout .sp .sp .I val unset_service_cookie_timeout : .B cookie:service_cookie_info -> unit .sp .sp .I val unset_volatile_data_cookie_timeout : .B cookie:data_cookie_info -> unit .sp .sp .I val unset_persistent_data_cookie_timeout : .B cookie:persistent_cookie_info -> unit Lwt.t .sp .sp .I val get_session_group_list : .B unit -> string list .sp Returns a list containing the names of all session group that are available for this site\&. .sp .sp .I val iter_service_cookies : .B (service_cookie_info -> unit Lwt.t) -> unit Lwt.t .sp Iterator on all active service cookies\&. .B Lwt_unix\&.yield is called automatically after each iteration\&. .sp .sp .I val iter_volatile_data_cookies : .B (data_cookie_info -> unit Lwt.t) -> unit Lwt.t .sp Iterator on data cookies\&. .B Lwt_unix\&.yield is called automatically after each iteration\&. .sp .sp .I val iter_persistent_data_cookies : .B (persistent_cookie_info -> unit Lwt.t) -> unit Lwt.t .sp Iterator on persistent cookies\&. .B Lwt_unix\&.yield is called automatically after each iteration\&. .sp .sp .I val fold_service_cookies : .B (service_cookie_info -> 'b -> 'b Lwt.t) -> 'b -> 'b Lwt.t .sp Iterator on service cookies\&. .B Lwt_unix\&.yield is called automatically after each iteration\&. .sp .sp .I val fold_volatile_data_cookies : .B (data_cookie_info -> 'b -> 'b Lwt.t) -> 'b -> 'b Lwt.t .sp Iterator on data cookies\&. .B Lwt_unix\&.yield is called automatically after each iteration\&. .sp .sp .I val fold_persistent_data_cookies : .B (persistent_cookie_info -> 'b -> 'b Lwt.t) -> 'b -> 'b Lwt.t .sp Iterator on persistent cookies\&. .B Lwt_unix\&.yield is called automatically after each iteration\&. .sp .sp