From bd61d2eb9058ed973aef50c6f4c4d97de208f830 Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 18 Feb 2017 20:45:54 +0100 Subject: [PATCH] remove public from BufferedConnection make actioner compatible with old application which use String as action name instead of new WEB_Action_Name --- web/CXM_making_a_web_site.anubis | 44 ++++++++++++++++++++++++++++++++++++++++++++ web/CXM_multihost_http_server.anubis | 6 ++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index 5b9f19a..e131657 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -1404,6 +1404,23 @@ public define HTML_In_Form String name ) = foreign_link([size(tsize)],url,name). + +public define HTML_In_Form +/* Older call with String as action instead of WEB_Action_Name. + * This function exists only for compatibility with older project. + * Please condiser to use above function instead + */ + actioner + ( + Actioner_Connection conn, + Actioner_Target targ, + Actioner_Aspect asp, + String action, + List((String,String)) extra_ops, + List(Actioner_Local_Action) local_actions + )= + actioner(conn,targ,asp,action_name(action),extra_ops,local_actions) +. public define HTML_In_Form actioner @@ -1643,6 +1660,16 @@ public define HTML_Off_Form ) = form(html_Id(form_name), options, action, extra_ops, content). +public define HTML_Off_Form + form + ( + String form_name, + List(CoreAttrs) options, + String action, + List((String,String)) extra_ops, + HTML_In_Form content + ) = + form(html_Id(form_name), options, action_name(action), extra_ops, content). public define HTML_Off_Form literal(Printable_tree t) = literal_pt(t). public define HTML_Off_Form fixed_size(HTML_Size width, HTML_Size height, String name_of_HTML_file) @@ -1681,6 +1708,23 @@ public define HTML_Off_Form Actioner_Target targ, Actioner_Aspect asp, String action, + List((String,String)) extra_ops, + List(Actioner_Local_Action) local_actions + )= + actioner(conn,targ,asp,action_name(action),extra_ops,local_actions) +. + +public define HTML_Off_Form +/* Older call with String as action instead of WEB_Action_Name. + * This function exists only for compatibility with older project. + * Please condiser to use above function instead + */ + actioner + ( + Actioner_Connection conn, + Actioner_Target targ, + Actioner_Aspect asp, + String action, List((String,String)) extra_ops )= actioner(conn,targ,asp,action_name(action),extra_ops,[]) diff --git a/web/CXM_multihost_http_server.anubis b/web/CXM_multihost_http_server.anubis index af98276..6dfabac 100644 --- a/web/CXM_multihost_http_server.anubis +++ b/web/CXM_multihost_http_server.anubis @@ -684,7 +684,8 @@ type EncodingType: www_url, multipart_form_data. -public type BufferedConnection: + +type BufferedConnection: buffered_connection(Connection conn, Var(ByteArray) buffer, Var(Int) read_pos, @@ -692,13 +693,14 @@ public type BufferedConnection: ). -public define BufferedConnection +define BufferedConnection buffered_connection ( Connection conn )= buffered_connection(conn, var(constant_byte_array(0, 0)), var(0), var([])) . + *** [2] Tools. -- libgit2 0.21.4