X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2Fhbugs%2Fcommon%2Fhbugs_messages.ml;fp=helm%2Fhbugs%2Fcommon%2Fhbugs_messages.ml;h=d0a6fe1dbad25b1d5274f25f335e3b97eb6c561d;hp=67e739c603ad5379fe557175fbcd98b936e156f9;hb=5d7d6bd5090f3f82279bef0b93b4b361a5b1d751;hpb=39d7157312213114f81948978510bed7d85a7610 diff --git a/helm/hbugs/common/hbugs_messages.ml b/helm/hbugs/common/hbugs_messages.ml index 67e739c60..d0a6fe1db 100644 --- a/helm/hbugs/common/hbugs_messages.ml +++ b/helm/hbugs/common/hbugs_messages.ml @@ -1,5 +1,7 @@ (* - * Copyright (C) 2003, HELM Team. + * Copyright (C) 2003: + * Stefano Zacchiroli + * for the HELM Team http://helm.cs.unibo.it/ * * This file is part of HELM, an Hypertextual, Electronic * Library of Mathematics, developed at the Computer Science @@ -21,7 +23,7 @@ * MA 02111-1307, USA. * * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. + * http://helm.cs.unibo.it/ *) open Hbugs_types;; @@ -62,6 +64,8 @@ let msg_of_string' s = match root#node_type with (* general purpose *) + | T_element "help" -> Help + | T_element "usage" -> Usage root#data | T_element "exception" -> Exception (get_attr root "name", root#data) (* client -> broker *) @@ -145,6 +149,8 @@ let pp_tutor_ids = List.fold_left (fun s id -> sprintf "%s" s id) "" let string_of_msg = function + | Help -> "" + | Usage usage_string -> sprintf "%s" usage_string | Exception (name, value) -> sprintf "%s" name value | Register_client (id, url) -> @@ -205,3 +211,6 @@ let string_of_msg = function | Thanks (id, musing_id) -> sprintf "" id musing_id +let submit_req ~url msg = + msg_of_string (Hbugs_misc.http_post ~body:(string_of_msg msg) url) +