From 6959b8be419f3755de6f888e24bfdc8de07383a7 Mon Sep 17 00:00:00 2001 From: garciay <yann.garcia@fscom.fr> Date: Thu, 21 Mar 2024 12:10:36 +0100 Subject: [PATCH] Remove useless whitespaces/tab --- .../LibHelpers/ttcn/LibHelpers_Functions.ttcn | 46 +++---- .../ttcn/LibHttp_BinaryMessageBodyTypes.ttcn | 2 +- ttcn/LibHttp/ttcn/LibHttp_BinaryTypes.ttcn | 4 +- .../ttcn/LibHttp_EncdecDeclarations.ttcn | 6 +- ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn | 86 ++++++------ ttcn/LibHttp/ttcn/LibHttp_JSONTypes.ttcn | 4 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 6 +- ttcn/LibHttp/ttcn/LibHttp_JsonTemplates.ttcn | 8 +- .../ttcn/LibHttp_MessageBodyTypes.ttcn | 10 +- ttcn/LibHttp/ttcn/LibHttp_Pics.ttcn | 12 +- ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn | 124 +++++++++--------- ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn | 12 +- ttcn/LibHttp/ttcn/LibHttp_TypesAndValues.ttcn | 18 +-- ttcn/LibHttp/ttcn/LibHttp_XMLTypes.ttcn | 6 +- .../ttcn/LibHttp_XmlMessageBodyTypes.ttcn | 8 +- ttcn/LibHttp/ttcn/LibHttp_XmlTemplates.ttcn | 10 +- ttcn/LibJson/ttcn/Json.ttcn | 6 +- .../http_www_w3_org_XML_1998_namespace.ttcn | 4 +- 18 files changed, 186 insertions(+), 186 deletions(-) diff --git a/ttcn/LibHelpers/ttcn/LibHelpers_Functions.ttcn b/ttcn/LibHelpers/ttcn/LibHelpers_Functions.ttcn index 32711d8..b5c6bd5 100644 --- a/ttcn/LibHelpers/ttcn/LibHelpers_Functions.ttcn +++ b/ttcn/LibHelpers/ttcn/LibHelpers_Functions.ttcn @@ -9,14 +9,14 @@ * All rights reserved. * */ - + module LibHelpers_Functions { // LibCommon import from LibCommon_BasicTypesAndValues all; - + group math { - + /** * @desc function to generate integer random values * @see ttcn-3 - rnd() @@ -32,10 +32,10 @@ module LibHelpers_Functions { //Variables var integer v_random := 0; v_random := float2int(int2float(p_upperbound - p_lowerbound + 1) * rnd()) + p_lowerbound; - + log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; - + } // End of function f_random /** @@ -45,7 +45,7 @@ module LibHelpers_Functions { */ function f_abs(in integer p_number) return integer { - + if(p_number < 0) { return 0 - p_number; } @@ -59,7 +59,7 @@ module LibHelpers_Functions { */ function ff_abs(in float p_number) return float { - + if(p_number < 0.0) { return 0.0 - p_number; } @@ -74,7 +74,7 @@ module LibHelpers_Functions { */ function f_min(in integer p_a, in integer p_b) return integer { - + if(p_a < p_b) { return p_a; } @@ -91,7 +91,7 @@ module LibHelpers_Functions { function f_removeUnsignificantBits(in bitstring p_bitstring) return bitstring { var integer i, len; - + len := lengthof(p_bitstring); for(i:=len-1; i >=0 and p_bitstring[i] == '0'B; i:=i-1) {} return substr(p_bitstring, 0, i + 1); @@ -106,61 +106,61 @@ module LibHelpers_Functions { */ function f_getCurrentTimeUtc() return UInt64 { var UInt64 v_time := 0; - + // log("*** f_getCurrentTimeUtc: INFO: calling fx_getCurrentTimeUtc() ***"); v_time := fx_getCurrentTimeUtc(); - + return v_time; } - + /** * @desc Gets the Minute of current UTC year * @return MinuteOfTheYear - tenths of a second in the current or next hour in units of 1/10th second from UTC time */ function f_getMinuteOfTheYear() return UInt16 { var UInt16 v_minuteOfTheYear := 0; - + // log("*** f_getMinuteOfTheYear: INFO: calling fx_getMinuteOfTheYear() ***"); v_minuteOfTheYear := fx_getMinuteOfTheYear(); - + return v_minuteOfTheYear; } - + /** * @desc Gets the milliseconds point in the current UTC minute * @return DSecond - The milliseconds point in the current UTC minute (0..60000) */ function f_getDSecond() return UInt16 { var UInt16 v_dSecond := 0; - + // log("*** f_getDSecond: INFO: calling fx_getDSecond() ***"); v_dSecond := fx_getDSecond(); - + return v_dSecond; } - + } // End of group datetime - + group externals { - + /** * @desc Gets the current time since 01/01/1970 in UTC format * @return The current time since 01/01/1970 in UTC format */ external function fx_getCurrentTimeUtc() return UInt64; - + /** * @desc Gets the minutes of current UTC year * @return MinuteOfTheYear - minutes of current UTC year */ external function fx_getMinuteOfTheYear() return UInt16; - + /** * @desc Gets the milliseconds point in the current UTC minute * @return DSecond - the milliseconds point in the current UTC minute */ external function fx_getDSecond() return UInt16; - + /** * @desc Encode into Base64 * @return p_to_encode - The buffer to be encoded diff --git a/ttcn/LibHttp/ttcn/LibHttp_BinaryMessageBodyTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_BinaryMessageBodyTypes.ttcn index 76a8b86..a8dd96a 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_BinaryMessageBodyTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_BinaryMessageBodyTypes.ttcn @@ -22,7 +22,7 @@ module LibHttp_BinaryMessageBodyTypes { } with { variant "" } - + } with { variant "" } // End of LibHttp_BinaryMessageBodyTypes diff --git a/ttcn/LibHttp/ttcn/LibHttp_BinaryTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_BinaryTypes.ttcn index 2606857..761a9b1 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_BinaryTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_BinaryTypes.ttcn @@ -1,9 +1,9 @@ module LibHttp_BinaryTypes { // FIXME To be removed - + /** * This file is volontary empry. You have to declare all XSD files required by your project * In addition, the TTCN-3 module LibHttp_XmlMessageBodyTypes have to be updated too. */ // TODO Add here your custom binary import - + } // End of module LibHttp_BinaryTypes diff --git a/ttcn/LibHttp/ttcn/LibHttp_EncdecDeclarations.ttcn b/ttcn/LibHttp/ttcn/LibHttp_EncdecDeclarations.ttcn index e7eb077..23ea56a 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_EncdecDeclarations.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_EncdecDeclarations.ttcn @@ -1,11 +1,11 @@ module LibHttp_EncdecDeclarations { // LibHttp import from LibHttp_TypesAndValues all; - + external function fx_enc_http_message (HttpMessage p) return bitstring with {extension "prototype(convert) encode(HttpCodec)"} - + external function fx_dec_http_message (inout bitstring b, out HttpMessage p) return integer with {extension "prototype(sliding) decode(HttpCodec)"} - + } // End of module LibHttp_EncdecDeclarations diff --git a/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn b/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn index 73b9791..b329dca 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn @@ -1,87 +1,87 @@ module LibHttp_Functions { - + // LibCommon import from LibCommon_Time all; import from LibCommon_VerdictControl all; import from LibCommon_Sync all; - + // LibHttp import from LibHttp_TypesAndValues all; import from LibHttp_Templates all; import from LibHttp_Pics all; import from LibHttp_Pixits all; import from LibHttp_TestSystem all; - + group preambles { - + /** * @desc Setup HTTP pprotocol port */ function f_cf_01_http_up() runs on HttpComponent { - + // Map ports map(self:httpPort, system:httpPort); - + // Connect f_connect4SelfOrClientSync(); - + activate(a_cf_01_http_down()); activate(a_default_requests()); activate(a_default_responses()); - + } // End of function f_cf_01_http_up - + /** * @desc Setup HTTP pprotocol port */ function f_cf_01_http_notif_up() runs on HttpComponent { - + // Map ports map(self:httpPort, system:httpPort); map(self:httpPort_notif, system:httpPort_notif); - + // Connect f_connect4SelfOrClientSync(); - + activate(a_cf_01_http_notif_down()); activate(a_default_requests()); activate(a_default_responses()); - + } // End of function f_cf_01_http_notif_up - + } // End of group preambles - + group postambles { - + /** * @desc Shutdown HTTP pprotocol port */ function f_cf_01_http_down() runs on HttpComponent { - + // Unmap ports unmap(self:httpPort, system:httpPort); - + // Disconnect ports f_disconnect4SelfOrClientSync(); - + deactivate; } // End of function f_cf_01_http_down - + /** * @desc Shutdown HTTP pprotocol port */ function f_cf_01_http_notif_down() runs on HttpComponent { - + // Unmap ports unmap(self:httpPort, system:httpPort); unmap(self:httpPort_notif, system:httpPort_notif); - + // Disconnect ports f_disconnect4SelfOrClientSync(); - + deactivate; } // End of function f_cf_01_http_notif_down - + /** * @desc Default handling cf01 de-initialisation. */ @@ -92,7 +92,7 @@ module LibHttp_Functions { stop; } } // End of altstep a_cf_01_http_down - + /** * @desc Default handling cf01 de-initialisation. */ @@ -103,18 +103,18 @@ module LibHttp_Functions { stop; } } // End of altstep a_cf_01_http_notif_down - + } // End of group postambles - + group http_headers { - + function f_init_default_headers_list( in charstring p_header_content_type := PICS_HEADER_CONTENT_TYPE, in charstring p_header_content_text := "", out Headers p_headers ) { var integer v_i := 0; - + p_headers[v_i] := { c_header_host, { PICS_HEADER_HOST } }; v_i := v_i + 1; p_headers[v_i] := { c_header_content_type, { p_header_content_type } }; @@ -140,7 +140,7 @@ module LibHttp_Functions { f_set_headers_list(PX_ADDITIONAL_HTTP_HEADERS_KEYS, PX_ADDITIONAL_HTTP_HEADERS_VALUES, p_headers); } } // End of function f_init_default_headers_list - + function f_set_headers_list( in charstring_list p_headers_to_set, in charstring_list p_headers_value, @@ -152,7 +152,7 @@ module LibHttp_Functions { } else if (lengthof(p_headers) == 0) { return; } - + for (var integer v_idx := 0; v_idx < lengthof(p_headers_to_set); v_idx := v_idx + 1) { var integer v_jdx; for (v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { @@ -167,7 +167,7 @@ module LibHttp_Functions { } } // End of 'for' statement } // End of function f_set_headers_list - + function f_remove_headers_list( in charstring_list p_headers_to_remove, inout Headers p_headers @@ -178,7 +178,7 @@ module LibHttp_Functions { } else if (lengthof(p_headers) == 0) { return; } - + for (var integer v_idx := 0; v_idx < lengthof(p_headers_to_remove); v_idx := v_idx + 1) { for (var integer v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { if (p_headers[v_jdx].header_name == p_headers_to_remove[v_idx]) { @@ -188,7 +188,7 @@ module LibHttp_Functions { } // End of 'for' statement } // End of 'for' statement } // End of function f_remove_headers_list - + function f_get_header( in Headers p_headers, in charstring p_header_name := c_header_content_text, @@ -200,7 +200,7 @@ module LibHttp_Functions { } else if (lengthof(p_headers) == 0) { return; } - + for (var integer v_jdx := 0; v_jdx < lengthof(p_headers); v_jdx := v_jdx + 1) { if (p_headers[v_jdx].header_name == p_header_name) { p_header_value := p_headers[v_jdx].header_value; // NOTE Codec won't encode it @@ -208,7 +208,7 @@ module LibHttp_Functions { } } // End of 'for' statement } // End of function f_get_header - + /** * @desc Check HTTP response headers * @param p_headers The HTTP headers @@ -222,7 +222,7 @@ module LibHttp_Functions { ) return boolean { // Local variables var boolean v_header_matched := false; - + for (var integer v_idx := 0; v_idx < lengthof(p_headers); v_idx := v_idx + 1) { if (p_headers[v_idx].header_name == p_header_name) { if (match(p_headers[v_idx].header_value[0], p_value) == true) { @@ -231,12 +231,12 @@ module LibHttp_Functions { break; } } // End of 'for' statement - + return v_header_matched; } // End of function f_check_headers } // End of group http_headers - + group altsteps { altstep a_default_requests() runs on HttpComponent { @@ -251,10 +251,10 @@ module LibHttp_Functions { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } // End of altstep a_default_requests - + altstep a_default_responses() runs on HttpComponent { var HttpMessage v_response; - + [] httpPort.receive( mw_http_response( mw_http_response_ok( @@ -320,7 +320,7 @@ module LibHttp_Functions { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } // End of altstep a_default_responses - + } // end of group altsteps - + } // End of module LibHttp_Functions diff --git a/ttcn/LibHttp/ttcn/LibHttp_JSONTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_JSONTypes.ttcn index e4a7ec3..ad0dace 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_JSONTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_JSONTypes.ttcn @@ -1,9 +1,9 @@ module LibHttp_JSONTypes { // FIXME To be removed - + /** * This file is volontary empry. You have to declare all XSD files required by your project * In addition, the TTCN-3 module LibHttp_XmlMessageBodyTypes have to be updated too. */ // TODO Add here your custom RFCs import - + } // End of module LibHttp_JSONTypes diff --git a/ttcn/LibHttp/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index ef31c51..7c6be92 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -1,18 +1,18 @@ module LibHttp_JsonMessageBodyTypes { - + /** * This file volontary contains a trivial declaration of the type JsonBody. * In accordance with your TTCN-3 module LibHttp_JSONTypes, you have to change the JsonBody typing. */ // TODO Add here your custom RFCs import - + type union JsonBody { // TODO Add here your custom variants universal charstring raw } with { variant "" } - + } with { encode "JSON"; variant "" diff --git a/ttcn/LibHttp/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/LibHttp/ttcn/LibHttp_JsonTemplates.ttcn index a7aa7f0..b390758 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_JsonTemplates.ttcn @@ -9,13 +9,13 @@ * All rights reserved. */ module LibHttp_JsonTemplates { - + // TODO Add here your custom RFCs import - + // LibHttp import from LibHttp_JsonMessageBodyTypes all; import from LibHttp_XMLTypes all; - + template (value) JsonBody m_json_body_raw( in template (value) charstring p_raw ) := { @@ -27,5 +27,5 @@ module LibHttp_JsonTemplates { ) := { raw := p_raw } // End of template mw_json_body_raw - + } // End of module LibHttp_JsonTemplates diff --git a/ttcn/LibHttp/ttcn/LibHttp_MessageBodyTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_MessageBodyTypes.ttcn index ed1d549..cfba5cb 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_MessageBodyTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_MessageBodyTypes.ttcn @@ -1,14 +1,14 @@ module LibHttp_MessageBodyTypes { - + // LibHttp import from LibHttp_XmlMessageBodyTypes all; import from LibHttp_JsonMessageBodyTypes all; import from LibHttp_BinaryMessageBodyTypes all; - + type charstring HtmlBody; - + type charstring TextBody; - + type union HttpMessageBody { BinaryBody binary_body, HtmlBody html_body, @@ -18,7 +18,7 @@ module LibHttp_MessageBodyTypes { } with { variant "" } // End of type HttpMessageBody - + } with { encode "HttpCodec" }// End of module LibHttp_MessageBodyTypes diff --git a/ttcn/LibHttp/ttcn/LibHttp_Pics.ttcn b/ttcn/LibHttp/ttcn/LibHttp_Pics.ttcn index c4c7b8a..9a759e1 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_Pics.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_Pics.ttcn @@ -4,33 +4,33 @@ module LibHttp_Pics { * @desc HTTP major version */ modulepar integer PICS_HTTP_VERSION_MAJOR := 1; - + /** * @desc HTTP minor version */ modulepar integer PICS_HTTP_VERSION_MINOR := 1; - + /** * @desc */ modulepar charstring PICS_HEADER_HOST := "www.lisp.com"; - + /** * @desc */ modulepar charstring PICS_HEADER_CONTENT_TYPE := "application/x-its-request"; modulepar charstring PICS_HEADER_CTL_CONTENT_TYPE := "application/x-its-ctl"; modulepar charstring PICS_HEADER_CRL_CONTENT_TYPE := "application/x-its-crl"; - + /** * @desc Set to false in TOKEN header shall not be used */ modulepar boolean PICS_USE_TOKEN_HEADER := true; - + /** * @desc HTTP TOKEN value * "YWxhZGRpbjpvcGVuc2VzYW1l==" is the base64 encoding of the login:password "aladdin:opensesame" */ modulepar charstring PICS_TOKEN_HEADER := "Basic " & "YWxhZGRpbjpvcGVuc2VzYW1l==" ; // aladdin:opensesame - + } // End of module LibHttp_Pics diff --git a/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn b/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn index 9a9d42a..452e56d 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn @@ -10,44 +10,44 @@ * @see ETSI TS 103 478 */ module LibHttp_Templates { - + // LibHttp import from LibHttp_TypesAndValues all; import from LibHttp_MessageBodyTypes all; import from LibHttp_XmlMessageBodyTypes all; import from LibHttp_JsonMessageBodyTypes all; import from LibHttp_BinaryMessageBodyTypes all; - + group http_messages { - + template (value) HttpMessage m_http_request( in template (value) Request p_request ) := { request := p_request } // End of template m_http_request - + template (present) HttpMessage mw_http_request( template (present) Request p_request := ? ) := { request := p_request } // End of template mw_http_request - + template (value) HttpMessage m_http_response( in template (value) Response p_response ) := { response := p_response } // End of template m_http_response - + template (present) HttpMessage mw_http_response( template (present) Response p_response := ? ) := { response := p_response } // End of template mw_http_response - + } // End of group http_messages - + group http_headers { - + template (value) Header m_header_line( in template (value) charstring p_header_name, in template (value) charstring_list p_header_value @@ -55,11 +55,11 @@ module LibHttp_Templates { header_name := p_header_name, header_value := p_header_value } // End of template m_header_line - + } // End of group http_headers - + group http_requests { - + template (omit) Request m_http_request_get( in charstring p_uri, in template (value) Headers p_headers, @@ -72,7 +72,7 @@ module LibHttp_Templates { header := p_headers, body := p_body } // End of template m_http_request_get - + template Request mw_http_request_get( template (present) charstring p_uri := ?, template (present) Headers p_headers := ?, @@ -85,7 +85,7 @@ module LibHttp_Templates { header := p_headers, body := p_body } // End of template mw_http_request_get - + template (omit) Request m_http_request_post( in charstring p_uri, in template (value) Headers p_headers, @@ -93,7 +93,7 @@ module LibHttp_Templates { ) modifies m_http_request_get := { method := "POST" } // End of template m_http_request_post - + template Request mw_http_request_post( template (present) charstring p_uri := ?, template (present) Headers p_headers := ?, @@ -101,7 +101,7 @@ module LibHttp_Templates { ) modifies mw_http_request_get := { method := "POST" } // End of template mw_http_request_post - + template (omit) Request m_http_request_patch( in charstring p_uri, in template (value) Headers p_headers, @@ -109,7 +109,7 @@ module LibHttp_Templates { ) modifies m_http_request_get := { method := "PATCH" } // End of template m_http_request_patch - + template Request mw_http_request_patch( template (present) charstring p_uri := ?, template (present) Headers p_headers := ?, @@ -117,7 +117,7 @@ module LibHttp_Templates { ) modifies mw_http_request_get := { method := "PATCH" } // End of template mw_http_request_patch - + template (omit) Request m_http_request_put( in charstring p_uri, in template (value) Headers p_headers, @@ -125,7 +125,7 @@ module LibHttp_Templates { ) modifies m_http_request_get := { method := "PUT" } // End of template m_http_request_put - + template Request mw_http_request_put( template (present) charstring p_uri := ?, template (present) Headers p_headers := ?, @@ -133,7 +133,7 @@ module LibHttp_Templates { ) modifies mw_http_request_get := { method := "PUT" } // End of template mw_http_request_put - + template (omit) Request m_http_request_delete( in charstring p_uri, in template (value) Headers p_headers, @@ -141,7 +141,7 @@ module LibHttp_Templates { ) modifies m_http_request_get := { method := "DELETE" } // End of template m_http_request_delete - + template Request mw_http_request_delete( template (present) charstring p_uri := ?, template (present) Headers p_headers := ?, @@ -149,11 +149,11 @@ module LibHttp_Templates { ) modifies mw_http_request_get := { method := "DELETE" } // End of template mw_http_request_post - + } // End of group http_requests - + group http_responses { - + template (value) Response m_http_response_ok( in template (value) HttpMessageBody p_body, in template (value) Headers p_header @@ -167,7 +167,7 @@ module LibHttp_Templates { tls := omit, mutual_tls := omit } // End of template m_http_response_ok - + template (value) Response m_http_response_ok_no_body( in template (value) Headers p_header ) := { @@ -180,7 +180,7 @@ module LibHttp_Templates { tls := omit, mutual_tls := omit } // End of template m_http_response_ok_no_body - + template (present) Response mw_http_response_ok_no_body( template (present) Headers p_header := ? ) := { @@ -193,14 +193,14 @@ module LibHttp_Templates { tls := *, mutual_tls := * } // End of template mw_http_response_ok_no_body - + template (value) Response m_http_response_204_no_content( in template (value) Headers p_header ) modifies m_http_response_ok_no_body := { statuscode := 204, statustext := "No Content" } // End of template m_http_response_204_no_content - + template (present) Response mw_http_response_ok( template (present) HttpMessageBody p_body := ?, template (present) Headers p_header := ? @@ -214,7 +214,7 @@ module LibHttp_Templates { tls := *, mutual_tls := * } // End of template mw_http_response_ok - + template (present) Response mw_http_response_201_created( template (present) HttpMessageBody p_body := ?, template (present) Headers p_header := ? @@ -222,7 +222,7 @@ module LibHttp_Templates { statuscode := 201, statustext := "Created" } // End of template mw_http_response_201_created - + template (present) Response mw_http_response_201_created_no_status_text( template (present) HttpMessageBody p_body := ?, template (present) Headers p_header := ? @@ -230,7 +230,7 @@ module LibHttp_Templates { statuscode := 201, statustext := ? } // End of template mw_http_response_201_created_no_status_text - + template (present) Response mw_http_response_202_accepted( template (present) HttpMessageBody p_body := ?, template (present) Headers p_header := ? @@ -238,14 +238,14 @@ module LibHttp_Templates { statuscode := 202, statustext := "Accepted" } // End of template mw_http_response_202_accepted - + template (present) Response mw_http_response_204_no_content( template (present) Headers p_header := ? ) modifies mw_http_response_ok_no_body := { statuscode := 204, statustext := "No Content" } // End of template mw_http_response_204_no_content - + template (value) Response m_http_response_ko( in template (value) HttpMessageBody p_body, in template (value) Headers p_header, @@ -261,7 +261,7 @@ module LibHttp_Templates { tls := omit, mutual_tls := omit } // End of template m_http_response_ko - + template (value) Response m_http_response_ko_no_body( in template (value) Headers p_header, in template (value) integer p_statuscode := 404, @@ -276,14 +276,14 @@ module LibHttp_Templates { tls := omit, mutual_tls := omit } // End of template m_http_response_ko_no_body - + template (value) Response m_http_response_500_internal_error( in template (value) Headers p_header, in template (value) integer p_statuscode := 500, in template (value) charstring p_statustext := "Internal Error" ) modifies m_http_response_ko_no_body := { } // End of template m_http_response_ko - + template (present) Response mw_http_response_ko_no_body( template (present) Headers p_header := ?, template (present) integer p_statuscode := 404, @@ -298,7 +298,7 @@ module LibHttp_Templates { tls := omit, mutual_tls := omit } // End of template mw_http_response_ko_no_body - + template Response mw_http_response_ko( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -312,7 +312,7 @@ module LibHttp_Templates { tls := omit, mutual_tls := omit } // End of template mw_http_response_ko - + template (value) Response m_http_response_400_bad_request( in template (value) HttpMessageBody p_body, in template (value) Headers p_header, @@ -320,7 +320,7 @@ module LibHttp_Templates { in template (value) charstring p_statustext := "Bad Request" ) modifies m_http_response_ko := { } // End of template m_http_response_400_bad_request - + template Response mw_http_response_400_bad_request( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -328,7 +328,7 @@ module LibHttp_Templates { statuscode := 400, statustext := "Bad Request" } // End of template mw_http_response_400_bad_request - + template Response mw_http_response_401_unauthorized( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -336,7 +336,7 @@ module LibHttp_Templates { statuscode := 401, statustext := "Unauthorized" } // End of template mw_http_response_401_unauthorized - + template Response mw_http_response_403_forbidden( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -344,7 +344,7 @@ module LibHttp_Templates { statuscode := 403, statustext := "Forbidden" } // End of template mw_http_response_403_forbidden - + template Response mw_http_response_404_not_found( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -352,7 +352,7 @@ module LibHttp_Templates { statuscode := 404, statustext := "Not Found" } // End of template mw_http_response_404_not_found - + template Response mw_http_response_405_not_applicable( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -360,7 +360,7 @@ module LibHttp_Templates { statuscode := 405, statustext := "Not Applicable" } // End of template mw_http_response_405_not_applicable - + template Response mw_http_response_412_precondition_failed( template HttpMessageBody p_body := *, template (present) Headers p_header := ? @@ -368,71 +368,71 @@ module LibHttp_Templates { statuscode := 412, statustext := "Precondition Failed" } // End of template mw_http_response_412_not_found - + } // End of group http_responses - + group http_html_body { - + template (value) HttpMessageBody m_http_message_body_html( in template (value) HtmlBody p_html_body ) := { html_body := p_html_body } // End of template m_http_message_body_html - + template (present) HttpMessageBody mw_http_message_body_html( template (present) HtmlBody p_html_body := ? ) := { html_body := p_html_body } // End of template mw_http_message_body_html - + } // End of group http_html_body - + group http_xml_body { - + template (value) HttpMessageBody m_http_message_body_xml( in template (value) XmlBody p_xml_body ) := { xml_body := p_xml_body } // End of template m_http_message_body_xml - + template (present) HttpMessageBody mw_http_message_body_xml( template (present) XmlBody p_xml_body := ? ) := { xml_body := p_xml_body } // End of template mw_http_message_body_xml - + } // End of group http_xml_body - + group http_json_body { - + template (value) HttpMessageBody m_http_message_body_json( in template (value) JsonBody p_json_body ) := { json_body := p_json_body } // End of template m_http_message_body_json - + template (present) HttpMessageBody mw_http_message_body_json( template (present) JsonBody p_json_body := ? ) := { json_body := p_json_body } // End of template mw_http_message_body_json - + } // End of group http_json_body - + group http_binary_body { - + template (value) HttpMessageBody m_http_message_body_binary( in template (value) BinaryBody p_binary_body ) := { binary_body := p_binary_body } // End of template m_http_message_body_binary - + template (present) HttpMessageBody mw_http_message_body_binary( template (present) BinaryBody p_binary_body := ? ) := { binary_body := p_binary_body } // End of template mw_http_message_body_binary - + } // End of group http_binary_body - + } // End of module LibHttp_Templates diff --git a/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn b/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn index 9d0271c..945a87e 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn @@ -10,18 +10,18 @@ * @see ETSI TS 103 478 */ module LibHttp_TestSystem { - + // LibCommon import from LibCommon_Sync all; import from LibCommon_Time all; - + // LibHttp import from LibHttp_TypesAndValues all; - + type port HttpPort message { inout HttpMessage; } - + type component HttpComponent extends SelfSyncComp { port HttpPort httpPort; port HttpPort httpPort_notif; @@ -30,10 +30,10 @@ module LibHttp_TestSystem { timer tc_ac := PX_TAC; timer tc_noac := PX_TNOAC; } // End of component HttpComponent - + type component HttpTestAdapter { port HttpPort httpPort; port HttpPort httpPort_notif; } // End of component HttpTestAdapter - + } // End of module LibHttp_TestSystem diff --git a/ttcn/LibHttp/ttcn/LibHttp_TypesAndValues.ttcn b/ttcn/LibHttp/ttcn/LibHttp_TypesAndValues.ttcn index 77ca51b..0d37019 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_TypesAndValues.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_TypesAndValues.ttcn @@ -10,11 +10,11 @@ * @see ETSI TS 103 478 */ module LibHttp_TypesAndValues { - + // LibHttp import from LibHttp_MessageBodyTypes all; import from LibHttp_Pics all; - + const charstring c_header_host := "Host"; const charstring c_header_content_type := "Content-Type"; const charstring c_header_content_text := "Content-Text"; @@ -24,10 +24,10 @@ module LibHttp_TypesAndValues { const charstring c_header_pragma := "Pragma"; const charstring c_header_cache_control := "Cache-Control"; const charstring c_header_authorization := "Authorization"; - + const integer c_http_version_major := PICS_HTTP_VERSION_MAJOR; const integer c_http_version_minor := PICS_HTTP_VERSION_MINOR; - + type record of charstring charstring_list; type record Header { charstring header_name, @@ -35,9 +35,9 @@ module LibHttp_TypesAndValues { } with { variant "FIELDORDER(msb)" } - + type record of Header Headers; - + type record Request { charstring method, charstring uri, @@ -48,7 +48,7 @@ module LibHttp_TypesAndValues { } with { variant "FIELDORDER(msb)" } - + type record Response { integer version_major, integer version_minor, @@ -61,14 +61,14 @@ module LibHttp_TypesAndValues { } with { variant "FIELDORDER(msb)" } - + type union HttpMessage { Response response, Request request } with { variant "" } - + } with { variant "" encode "HttpCodec" diff --git a/ttcn/LibHttp/ttcn/LibHttp_XMLTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_XMLTypes.ttcn index bdb9f77..a6c7f96 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_XMLTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_XMLTypes.ttcn @@ -1,11 +1,11 @@ module LibHttp_XMLTypes { // FIXME To be removed - + /** * This file is volontary empry. You have to declare all XSD files required by your project * In addition, the TTCN-3 module LibHttp_XmlMessageBodyTypes have to be updated too. */ // TODO Add here your custom RFCs import - + //import from XSD all; - + } // End of module LibHttp_XMLTypes diff --git a/ttcn/LibHttp/ttcn/LibHttp_XmlMessageBodyTypes.ttcn b/ttcn/LibHttp/ttcn/LibHttp_XmlMessageBodyTypes.ttcn index 96cfb2f..b57854c 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_XmlMessageBodyTypes.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_XmlMessageBodyTypes.ttcn @@ -1,23 +1,23 @@ module LibHttp_XmlMessageBodyTypes { - + /** * This file volontary contains a trivial declaration of the type XmlBody. * In accordance with your TTCN-3 module LibHttp_XMLTypes, you have to change the XmlBody typing. */ // TODO Add here your custom RFCs import - + type union XmlBodyMsg { // TODO Add here your custom variants charstring raw } with { variant "" } - + type record XmlBody { XmlBodyMsg msg, charstring raw optional } - + } with { encode "XML"; variant "" diff --git a/ttcn/LibHttp/ttcn/LibHttp_XmlTemplates.ttcn b/ttcn/LibHttp/ttcn/LibHttp_XmlTemplates.ttcn index 343300c..1c28c26 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_XmlTemplates.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_XmlTemplates.ttcn @@ -9,15 +9,15 @@ * All rights reserved. */ module LibHttp_XmlTemplates { - + // import from XSD all; - + // TODO Add here your custom RFCs import - + // LibHttp import from LibHttp_XmlMessageBodyTypes all; import from LibHttp_XMLTypes all; - + template (value) XmlBody m_xml_body_raw( in template (value) charstring p_raw ) := { @@ -31,5 +31,5 @@ module LibHttp_XmlTemplates { msg := { raw := p_raw }, raw := p_raw } // End of template mw_xml_body_raw - + } // End of module LibHttp_XmlTemplates diff --git a/ttcn/LibJson/ttcn/Json.ttcn b/ttcn/LibJson/ttcn/Json.ttcn index ff45ceb..cb7a8f5 100644 --- a/ttcn/LibJson/ttcn/Json.ttcn +++ b/ttcn/LibJson/ttcn/Json.ttcn @@ -1,5 +1,5 @@ module Json { - + // These constants are used in the Json date/time type definitions const charstring dash := "-", @@ -156,13 +156,13 @@ module Json { } with { variant "asValue" }*/ - + //Json literals //When only the true and false literals are allowed type boolean Bool; /*with { variant "Json:literal" }*/ //When only the null literal is allowed type enumerated Null { null_ }; /*with { variant "Json:literal" }*/ - + } with { encode "Json" } // End of module Json diff --git a/ttcn/LibXsd/ttcn/http_www_w3_org_XML_1998_namespace.ttcn b/ttcn/LibXsd/ttcn/http_www_w3_org_XML_1998_namespace.ttcn index dd35e71..e595c61 100644 --- a/ttcn/LibXsd/ttcn/http_www_w3_org_XML_1998_namespace.ttcn +++ b/ttcn/LibXsd/ttcn/http_www_w3_org_XML_1998_namespace.ttcn @@ -64,7 +64,7 @@ import from XSD all; is a language code for the natural language of the content of any element; its value is inherited. This name is reserved by virtue of its definition in the XML specification. - + space (as an attribute name): denotes an attribute whose value is a keyword indicating what whitespace processing discipline is intended for the content of the element; its @@ -100,7 +100,7 @@ import from XSD all; <type . . .> . . . <attributeGroup ref="xml:specialAttrs"/> - + will define a type which will schema-validate an instance element with any of those attributes */ -- GitLab