module Eliom_common:sig
..end
typescope_hierarchy =
Eliom_common_base.scope_hierarchy
[ `Client_process of scope_hierarchy
| `Session of scope_hierarchy ]
= typeuser_scope =
[ `Client_process of scope_hierarchy
| `Session of scope_hierarchy
| `Session_group of scope_hierarchy ]
typescope =
[ `Client_process of scope_hierarchy
| `Session of scope_hierarchy
| `Session_group of scope_hierarchy
| `Site ]
typeall_scope =
[ `Client_process of scope_hierarchy
| `Global
| `Request
| `Session of scope_hierarchy
| `Session_group of scope_hierarchy
| `Site ]
[ `Client_process | `Session ]
= typeuser_level =
[ `Client_process | `Session | `Session_group ]
[< user_scope ] -> [> cookie_scope ]
: [< user_scope ] -> [> cookie_level ]
: val level_of_user_scope : [< user_scope ] -> [> user_level ]
typeglobal_scope =
[ `Global ]
It is possible to define Eliom references or services for one (browser) session, for one tab, or for one group of sessions.
Using `Global
scope means you want the data or service to
be available to any client. `Site
is limited to current sub-site
(if you have several sites on the same server).
If you want to restrict the visibility of an Eliom reference or
a service:
* to a browser session, use ~scope:Eliom_common.default_session_scope
,
* to a group of sessions, use ~scope:Eliom_common.default_group_scope
,
* to a client process, use ~scope:Eliom_common.default_process_scope
.
If you have a client side Eliom program running, and you want to restrict
the visibility of the service to this instance of the program,
use ~scope:Eliom_common.default_process_scope
.
You can create new scope
hierachies with Eliom_common.create_scope_hierarchy
.
Thus it is possible to have for example several sessions that can
be opened or closed independently. They use different cookies.
Secure scopes are associated to secure cookies (that is, cookies sent
by browsers only if the protocol is https).
typesite_scope =
[ `Site ]
typesession_group_scope =
[ `Session_group of scope_hierarchy ]
typesession_scope =
[ `Session of scope_hierarchy ]
typeclient_process_scope =
[ `Client_process of scope_hierarchy ]
typerequest_scope =
[ `Request ]
val global_scope : global_scope
val site_scope : site_scope
val default_group_scope : session_group_scope
val default_session_scope : session_scope
val default_process_scope : client_process_scope
val comet_client_process_scope : client_process_scope
val request_scope : request_scope
val create_scope_hierarchy : string -> scope_hierarchy
val list_scope_hierarchies : unit -> scope_hierarchy list
exception Eliom_404
exception Eliom_Wrong_parameter
exception Eliom_Session_expired
exception Eliom_Typing_Error of (string * exn) list
exception Eliom_site_information_not_available of string
In particular, you cannot use the function before the configuration file
is read for example when you are using static linking.
In that case you must
delay the function call using Eliom_service.register_eliom_module
.
typefull_state_name =
user_scope * bool * string
module Full_state_name_table:Map.S
with type key = full_state_name
val eliom_link_too_old : bool Polytables.key
val eliom_service_session_expired : (full_state_name list * full_state_name list)
Polytables.key