Module type Eliommkreg.ELIOMREGSIG1


module type ELIOMREGSIG1 = sig .. end

type page 
val send : ?cookies:Eliomservices.cookie list ->
?charset:string ->
?code:int ->
sp:Eliomsessions.server_params ->
page -> Eliomservices.result_to_send Lwt.t
val register : ?sp:Eliomsessions.server_params ->
service:('a, 'b, [< Eliomservices.internal_service_kind ],
[< Eliomservices.suff ], 'c, 'd, [ `Registrable ])
Eliomservices.service ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'b -> page Lwt.t) ->
unit
registers an service in the public service table with the associated handler function. register service t f will associate the service service to the function f. f is the function that creates a page, called service handler.

That function takes three parameters.

For example if t is Eliomparameters.int "s", then 'get is int.

Warning: If you want to register a service in the global table after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliommod.Eliom_function_forbidden_outside_site_loading.

Registering services and coservices is always done in memory as there is no means of marshalling closures.

Registering after initialization is not encouraged for coservices without timeout, as such services will be available only until the end of the server process! If you use that for main services, you will dynamically create new URLs! This may be dangerous as they will disappear if you stop the server. Be very careful to re-create these URLs when you relaunch the server, otherwise, some external links or bookmarks may be broken!

val register_for_session : ?session_name:string ->
sp:Eliomsessions.server_params ->
service:('a, 'b, [< Eliomservices.internal_service_kind ],
[< Eliomservices.suff ], 'c, 'd, [ `Registrable ])
Eliomservices.service ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'b -> page Lwt.t) ->
unit
registers a handler for a service in the session table. If the same client does a request to this service, this function will be used instead of the one from the public table.

Warning:


val register_new_service : ?sp:Eliomsessions.server_params ->
path:Extensions.url_path ->
get_params:('a, [< Eliomservices.suff ] as 'b, 'c)
Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of
[> `Internal of [> `Service ] * [> `Get ] ] Eliomservices.a_s ],
'b, 'c, unit, [> `Registrable ])
Eliomservices.service
Same as new_service followed by register
val register_new_coservice : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of
[ `Internal of [ `Service ] * [ `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], unit, unit, [< Eliomservices.registrable ])
Eliomservices.service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.service
Same as new_coservice followed by register
val register_new_coservice' : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit, [> `Nonattached of [> `Get ] Eliomservices.na_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.service
Same as new_coservice' followed by register
val register_new_coservice_for_session : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of
[ `Internal of [ `Service ] * [ `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], unit, unit, [< Eliomservices.registrable ])
Eliomservices.service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.service
Same as new_coservice followed by register_for_session
val register_new_coservice_for_session' : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit, [> `Nonattached of [> `Get ] Eliomservices.na_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.service
Same as new_coservice' followed by register_for_session
val register_new_post_service : ?sp:Eliomsessions.server_params ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [ `Coservice | `Service ] * [ `Get ] ]
Eliomservices.a_s ],
[< Eliomservices.suff ] as 'b, 'c, unit, [< `Registrable ])
Eliomservices.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [ `Coservice | `Service ] * [> `Post ] ]
Eliomservices.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliomservices.service
Same as new_post_service followed by register
val register_new_post_coservice : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
Eliomservices.a_s ],
[< Eliomservices.suff ] as 'b, 'c, unit, [< `Registrable ])
Eliomservices.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Post ] ] Eliomservices.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliomservices.service
Same as new_post_coservice followed by register
val register_new_post_coservice' : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
unit -> 'a -> page Lwt.t) ->
(unit, 'a, [> `Nonattached of [> `Post ] Eliomservices.na_s ],
[ `WithoutSuffix ], unit, 'b, [> `Registrable ])
Eliomservices.service
Same as new_post_coservice' followed by register
val register_new_post_coservice_for_session : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
Eliomservices.a_s ],
[< Eliomservices.suff ] as 'b, 'c, unit, [ `Registrable ])
Eliomservices.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Post ] ] Eliomservices.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliomservices.service
Same as new_post_coservice followed by register_for_session
val register_new_post_coservice_for_session' : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
unit -> 'a -> page Lwt.t) ->
(unit, 'a, [> `Nonattached of [> `Post ] Eliomservices.na_s ],
[ `WithoutSuffix ], unit, 'b, [> `Registrable ])
Eliomservices.service
Same as new_post_coservice' followed by register_for_session