.TH "Eliom_common" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_common \- Low level functions for Eliom, exceptions and types. .SH Module Module Eliom_common .SH Documentation .sp Module .BI "Eliom_common" : .B sig end .sp Low level functions for Eliom, exceptions and types\&. .sp .sp .sp .sp .I type scope_hierarchy = .B Eliom_common_base.scope_hierarchy .sp .B Scopes .sp .sp .I type cookie_scope = .B [ `Client_process of scope_hierarchy .B | `Session of scope_hierarchy ] .sp .sp .I type user_scope = .B [ `Client_process of scope_hierarchy .B | `Session of scope_hierarchy .B | `Session_group of scope_hierarchy ] .sp .sp .I type scope = .B [ `Client_process of scope_hierarchy .B | `Session of scope_hierarchy .B | `Session_group of scope_hierarchy .B | `Site ] .sp .sp .I type all_scope = .B [ `Client_process of scope_hierarchy .B | `Global .B | `Request .B | `Session of scope_hierarchy .B | `Session_group of scope_hierarchy .B | `Site ] .sp .sp .I type cookie_level = .B [ `Client_process | `Session ] .sp .sp .I type user_level = .B [ `Client_process | `Session | `Session_group ] .sp .sp .I val cookie_scope_of_user_scope : .B [< user_scope ] -> [> cookie_scope ] .sp .sp .I val cookie_level_of_user_scope : .B [< user_scope ] -> [> cookie_level ] .sp .sp .I val level_of_user_scope : .B [< user_scope ] -> [> user_level ] .sp .sp .I type global_scope = .B [ `Global ] .sp Eliom is using regular (browser) cookies but can also use its own browser tab cookies (only if you are using a client side Eliom application)\&. .sp It is possible to define Eliom references or services for one (browser) session, for one tab, or for one group of sessions\&. .sp Using .B `Global scope means you want the data or service to be available to any client\&. .B `Site is limited to current sub\-site (if you have several sites on the same server)\&. .sp If you want to restrict the visibility of an Eliom reference or a service: * to a browser session, use .B ~scope:Eliom_common\&.default_session_scope , * to a group of sessions, use .B ~scope:Eliom_common\&.default_group_scope , * to a client process, use .B ~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 .B ~scope:Eliom_common\&.default_process_scope \&. .sp You can create new scope hierachies with .B 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\&. .sp Secure scopes are associated to secure cookies (that is, cookies sent by browsers only if the protocol is https)\&. .sp .sp .I type site_scope = .B [ `Site ] .sp .sp .I type session_group_scope = .B [ `Session_group of scope_hierarchy ] .sp .sp .I type session_scope = .B [ `Session of scope_hierarchy ] .sp .sp .I type client_process_scope = .B [ `Client_process of scope_hierarchy ] .sp .sp .I type request_scope = .B [ `Request ] .sp .sp .I val global_scope : .B global_scope .sp .sp .I val site_scope : .B site_scope .sp .sp .I val default_group_scope : .B session_group_scope .sp .sp .I val default_session_scope : .B session_scope .sp .sp .I val default_process_scope : .B client_process_scope .sp .sp .I val comet_client_process_scope : .B client_process_scope .sp .sp .I val request_scope : .B request_scope .sp .sp .I val create_scope_hierarchy : .B string -> scope_hierarchy .sp .sp .I val list_scope_hierarchies : .B unit -> scope_hierarchy list .sp .sp .PP .B === .B Exception and error handling .B === .PP .I exception Eliom_404 .sp Page not found .sp .sp .I exception Eliom_Wrong_parameter .sp Service called with wrong parameter names .sp .sp .I exception Eliom_Session_expired .sp .sp .I exception Eliom_Typing_Error .B of .B (string * exn) list .sp The service (GET or POST) parameters do not match expected type .sp .sp .I exception Eliom_site_information_not_available .B of .B string .sp That function cannot be used when the site information is not available, that is, outside a request or the initialisation phase of your Eliom module (while reading the configuration file)\&. .sp 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 .B Eliom_service\&.register_eliom_module \&. .sp .sp .I type full_state_name = .B user_scope * bool * string .sp .sp .I module Full_state_name_table : .B sig end .sp .sp .I val eliom_link_too_old : .B bool Polytables.key .sp If present and true in request data, it means that the previous coservice does not exist any more .sp .sp .I val eliom_service_session_expired : .B (full_state_name list * full_state_name list) .B Polytables.key .sp If present in request data, means that the service session cookies does not exist any more\&. The string lists are the list of names of expired sessions .sp .sp