1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374# 1 "src/lib/eliom_common.client.ml"(* Ocsigen
* http://www.ocsigen.org
* Copyright (C) 2010 Vincent Balat
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)includeEliom_common_basetypeserver_params=unitletget_sp()=()letget_sp_option()=Some()type'awrapper=unitletmake_wrapper_:'awrapper=()letempty_wrapper():'awrapper=()typeunwrap_id=Eliom_unwrap.unwrap_idletreact_up_unwrap_id:unwrap_id=Eliom_unwrap.id_of_intreact_up_unwrap_id_intletreact_down_unwrap_id:unwrap_id=Eliom_unwrap.id_of_intreact_down_unwrap_id_intletsignal_down_unwrap_id:unwrap_id=Eliom_unwrap.id_of_intsignal_down_unwrap_id_intletcomet_channel_unwrap_id:unwrap_id=Eliom_unwrap.id_of_intcomet_channel_unwrap_id_intletbus_unwrap_id:unwrap_id=Eliom_unwrap.id_of_intbus_unwrap_id_int(* On client side, we have sitedata.
Thus, we can define new services.
That's why this function returns Some sitedata. *)letsitedata:Eliom_types.sitedataoptionref=refNoneletglobal_register_allowed()=match!sitedatawithNone->None|Somes->Some(fun()->s)letget_site_dirsitedata=sitedata.Eliom_types.site_dirletget_site_dir_stringsitedata=sitedata.Eliom_types.site_dir_stringletadd_unregistered__=()moduleTo_and_of_shared=structtype'at='ato_and_ofletof_string{of_string}=of_stringletto_string{to_string}=to_stringletto_and_oftao=taoendletclient_html_file,set_client_html_file=letr=ref"eliom.html"in((fun()->!r),funs->assert!is_client_app;r:=s)