module Eliomsessions:This module contains the functions you need to get (or set) information about the request or the session.sig..end
If you want several sessions of the same type for one site,
you can choose a personalized session name by giving the optional
parameter ?session_name.
type server_params
val get_user_agent : sp:server_params -> stringval get_full_url : sp:server_params -> stringval get_ip : sp:server_params -> stringval get_inet_addr : sp:server_params -> Unix.inet_addrUnix.inet_addr (defined in OCaml's standard library).val get_current_path_string : sp:server_params -> stringval get_current_full_path : sp:server_params -> Extensions.url_pathExtensions.url_pathval get_current_sub_path : sp:server_params -> Extensions.url_pathExtensions.url_path.
The sub-path is the full path without the path of the site (set in the
configuration file).val get_hostname : sp:server_params -> string optionval get_port : sp:server_params -> intval get_suffix : sp:server_params -> Extensions.url_pathval get_cookies : sp:server_params -> string Http_frame.Cookievalues.tval set_global_volatile_session_timeout : ?session_name:string ->
?sp:server_params ->
?recompute_expdates:bool -> float option -> unit Lwt.tNone = no timeout.
The optional parameter ?recompute_expdates is false by default.
If you set it to true, the expiration dates for all sessions in the table
will be recomputed with the new timeout.
That is, the difference between the new timeout and the old one will
be added to their expiration dates.
Sessions whose timeout has been set individually
with Eliomsessions.set_volatile_session_timeout won't be affected.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val set_global_service_session_timeout : ?session_name:string ->
?sp:server_params ->
?recompute_expdates:bool -> float option -> unit Lwt.tNone = no timeout.
The optional parameter ?recompute_expdates is false by default.
If you set it to true, the expiration dates for all sessions in the table
will be recomputed with the new timeout.
That is, the difference between the new timeout and the old one will
be added to their expiration dates.
Sessions whose timeout has been set individually
with Eliomsessions.set_service_session_timeout won't be affected.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val set_global_volatile_data_session_timeout : ?session_name:string ->
?sp:server_params ->
?recompute_expdates:bool -> float option -> unit Lwt.tNone = no timeout.
The optional parameter ?recompute_expdates is false by default.
If you set it to true, the expiration dates for all sessions in the table
will be recomputed with the new timeout.
That is, the difference between the new timeout and the old one will
be added to their expiration dates.
Sessions whose timeout has been set individually
with Eliomsessions.set_volatile_data_session_timeout won't be affected.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_global_service_session_timeout : ?session_name:string ->
?sp:server_params -> unit -> float optionNone = no timeout.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_global_volatile_data_session_timeout : ?session_name:string ->
?sp:server_params -> unit -> float optionNone = no timeout.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_default_service_session_timeout : unit -> float optionNone = no timeout.val get_default_volatile_data_session_timeout : unit -> float optionNone = no timeout.val set_default_volatile_session_timeout : float option -> unitNone = no timeout.val set_default_service_session_timeout : float option -> unitNone = no timeout.val set_default_volatile_data_session_timeout : float option -> unitNone = no timeout.val set_global_persistent_data_session_timeout : ?session_name:string ->
?sp:server_params ->
?recompute_expdates:bool -> float option -> unit Lwt.tNone = no timeout.
The optional parameter ?recompute_expdates is false by default.
If you set it to true, the expiration dates for all sessions in the table
will be recomputed with the new timeout.
That is, the difference between the new timeout and the old one will
be added to their expiration dates.
Sessions whose timeout has been set individually
with Eliomsessions.set_persistent_data_session_timeout won't be affected.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_global_persistent_data_session_timeout : ?session_name:string ->
?sp:server_params -> unit -> float optionNone = no timeout.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_default_persistent_data_session_timeout : unit -> float optionNone = no timeout.val set_default_persistent_data_session_timeout : float option -> unitNone = no timeout.val set_service_session_timeout : ?session_name:string ->
sp:server_params -> float option -> unitNone = no timeoutval unset_service_session_timeout : ?session_name:string -> sp:server_params -> unit -> unitval get_service_session_timeout : ?session_name:string ->
sp:server_params -> unit -> float optionNone = no timeoutval set_volatile_data_session_timeout : ?session_name:string ->
sp:server_params -> float option -> unitNone = no timeoutval unset_volatile_data_session_timeout : ?session_name:string -> sp:server_params -> unit -> unitval get_volatile_data_session_timeout : ?session_name:string ->
sp:server_params -> unit -> float optionNone = no timeoutval set_volatile_session_timeout : ?session_name:string ->
sp:server_params -> float option -> unitNone = no timeoutval unset_volatile_session_timeout : ?session_name:string -> sp:server_params -> unit -> unitval set_persistent_data_session_timeout : ?session_name:string ->
sp:server_params -> float option -> unit Lwt.tNone = no timeoutval unset_persistent_data_session_timeout : ?session_name:string -> sp:server_params -> unit -> unit Lwt.tval get_persistent_data_session_timeout : ?session_name:string ->
sp:server_params -> unit -> float option Lwt.tNone = no timeoutval set_volatile_session_cookies_exp_date : ?session_name:string ->
sp:server_params -> float option -> unit
None means the cookie will expire when the browser is closed.
No means to set cookies for an infinite time on browsers.
val set_service_session_cookie_exp_date : ?session_name:string ->
sp:server_params -> float option -> unit
None means the cookie will expire when the browser is closed.
No means to set cookies for an infinite time on browsers.
val set_volatile_data_session_cookie_exp_date : ?session_name:string ->
sp:server_params -> float option -> unit
None means the cookie will expire when the browser is closed.
No means to set cookies for an infinite time on browsers.
val set_persistent_data_session_cookie_exp_date : ?session_name:string ->
sp:server_params -> float option -> unit Lwt.t
None means the cookie will expire when the browser is closed.
No means to set cookies for an infinite time on browsers.
val get_exn : sp:server_params -> exn listval get_previous_extension_error_code : sp:server_params -> intval get_tmp_filename : Extensions.file_info -> stringval get_filesize : Extensions.file_info -> int64val get_original_filename : Extensions.file_info -> stringval get_config : unit -> Simplexmlparser.xml list<site> and </site>).
Warning: You must call that function during the initialisation of
your module (not during a Lwt thread or a service).
If you use that function after,
you must give the ~sp parameter, otherwise it will raise the exception
Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_site_dir : sp:server_params -> Extensions.url_pathval get_config_file_charset : sp:server_params -> stringtype 'a session_data =
| |
No_data |
| |
Data_session_expired |
| |
Data of |
type 'a volatile_table
val create_volatile_table : ?sp:server_params -> unit -> 'a volatile_table
Warning: If you use that function after the initialization phase,
you must give the ~sp parameter, otherwise it will raise the exception
Eliommod.Eliom_function_forbidden_outside_site_loading.
val get_volatile_session_data : ?session_name:string ->
table:'a volatile_table ->
sp:server_params -> unit -> 'a session_dataval set_volatile_session_data : ?session_name:string ->
table:'a volatile_table ->
sp:server_params -> 'a -> unitval remove_volatile_session_data : ?session_name:string ->
table:'a volatile_table ->
sp:server_params -> unit -> unittype 'a persistent_table
val create_persistent_table : string -> 'a persistent_tableOcsipersist.val get_persistent_session_data : ?session_name:string ->
table:'a persistent_table ->
sp:server_params -> unit -> 'a session_data Lwt.tval set_persistent_session_data : ?session_name:string ->
table:'a persistent_table ->
sp:server_params -> 'a -> unit Lwt.tval remove_persistent_session_data : ?session_name:string ->
table:'a persistent_table ->
sp:server_params -> unit -> unit Lwt.tval close_session : ?session_name:string -> sp:server_params -> unit -> unit Lwt.t
Shortcut for Eliomsessions.close_volatile_data_session followed by
Eliomsessions.close_service_session and
Eliomsessions.close_persistent_data_session.
val close_volatile_session : ?session_name:string -> sp:server_params -> unit -> unit
Shortcut for Eliomsessions.close_volatile_data_session followed by
Eliomsessions.close_service_session.
val close_persistent_data_session : ?session_name:string -> sp:server_params -> unit -> unit Lwt.tval close_volatile_data_session : ?session_name:string -> sp:server_params -> unit -> unitval close_service_session : ?session_name:string -> sp:server_params -> unit -> unitval close_all_sessions : ?session_name:string -> ?sp:server_params -> unit -> unit Lwt.t?session_name (session name) is not present,
the session with default name is closed.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val close_all_volatile_sessions : ?session_name:string -> ?sp:server_params -> unit -> unit Lwt.t?session_name (session name) is not present,
the session with default name is closed.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val close_all_persistent_data_sessions : ?session_name:string -> ?sp:server_params -> unit -> unit Lwt.t?session_name (session name) is not present,
the session with default name is closed.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val close_all_service_sessions : ?session_name:string -> ?sp:server_params -> unit -> unit Lwt.t?session_name (session name) is not present,
the session with default name is closed.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val close_all_volatile_data_sessions : ?session_name:string -> ?sp:server_params -> unit -> unit Lwt.t?session_name (session name) is not present,
the session with default name is closed.
Warning: If you use this function after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
module Session_admin:sig..end
val get_get_params : sp:server_params -> (string * string) listval get_all_get_params : sp:server_params -> (string * string) listval get_other_get_params : sp:server_params -> (string * string) listval get_post_params : sp:server_params -> (string * string) list Lwt.tval get_all_post_params : sp:server_params -> (string * string) listval get_ri : sp:server_params -> Extensions.request_infoval get_session_name : sp:server_params -> string optionNone if it is not a session service)val get_persistent_data_session_cookie : ?session_name:string ->
sp:server_params -> unit -> string option Lwt.tNone is no session is active.val get_service_session_cookie : ?session_name:string ->
sp:server_params -> unit -> string optionNone is no session is active.val get_volatile_data_session_cookie : ?session_name:string ->
sp:server_params -> unit -> string optionNone is no session is active.