changed prefix GW_ into EWF_ for EiffelWebFramework

use READABLE_STRING_GENERAL instead of just STRING
This commit is contained in:
Jocelyn Fiat
2011-08-25 16:00:18 +02:00
parent 53ccaa3fde
commit c20600f281
24 changed files with 63 additions and 63 deletions

View File

@@ -21,7 +21,7 @@ feature -- Helper
local local
s, uri_s: detachable STRING s, uri_s: detachable STRING
i, n: INTEGER i, n: INTEGER
h: GW_HEADER h: EWF_HEADER
do do
create h.make create h.make
h.put_status ({HTTP_STATUS_CODE}.unsupported_media_type) h.put_status ({HTTP_STATUS_CODE}.unsupported_media_type)

View File

@@ -53,7 +53,7 @@ feature -- Execution
execute_default (req: EWSGI_REQUEST; res: EWSGI_RESPONSE_BUFFER) execute_default (req: EWSGI_REQUEST; res: EWSGI_RESPONSE_BUFFER)
local local
h: GW_HEADER h: EWF_HEADER
l_url: STRING l_url: STRING
e: EXECUTION_ENVIRONMENT e: EXECUTION_ENVIRONMENT
n: INTEGER n: INTEGER
@@ -120,7 +120,7 @@ feature -- Execution
local local
l_response_content_type: detachable STRING l_response_content_type: detachable STRING
msg: STRING msg: STRING
h: GW_HEADER h: EWF_HEADER
content_type_supported: ARRAY [STRING] content_type_supported: ARRAY [STRING]
do do
if a_name /= Void then if a_name /= Void then

View File

@@ -27,27 +27,27 @@ feature {NONE} -- Initialization
feature -- Access feature -- Access
path_variables: HASH_TABLE [STRING, STRING] path_variables: HASH_TABLE [STRING, READABLE_STRING_GENERAL]
-- Variables being part of the path segments -- Variables being part of the path segments
query_variables: HASH_TABLE [STRING, STRING] query_variables: HASH_TABLE [STRING, READABLE_STRING_GENERAL]
-- Variables being part of the query segments (i.e: after the ?) -- Variables being part of the query segments (i.e: after the ?)
feature -- Query feature -- Query
path_variable (n: STRING): detachable STRING path_variable (n: READABLE_STRING_GENERAL): detachable STRING
-- Value related to query variable name `n' -- Value related to query variable name `n'
do do
Result := path_variables.item (n) Result := path_variables.item (n)
end end
query_variable (n: STRING): detachable STRING query_variable (n: READABLE_STRING_GENERAL): detachable STRING
-- Value related to path variable name `n' -- Value related to path variable name `n'
do do
Result := query_variables.item (n) Result := query_variables.item (n)
end end
variable (n: STRING): detachable STRING variable (n: READABLE_STRING_GENERAL): detachable STRING
-- Value related to variable name `n' -- Value related to variable name `n'
do do
Result := query_variable (n) Result := query_variable (n)
@@ -58,7 +58,7 @@ feature -- Query
feature -- Query: url-decoded feature -- Query: url-decoded
url_decoded_query_variable (n: STRING): detachable STRING_32 url_decoded_query_variable (n: READABLE_STRING_GENERAL): detachable STRING_32
-- Unencoded value related to variable name `n' -- Unencoded value related to variable name `n'
do do
if attached query_variable (n) as v then if attached query_variable (n) as v then
@@ -66,7 +66,7 @@ feature -- Query: url-decoded
end end
end end
url_decoded_path_variable (n: STRING): detachable STRING_32 url_decoded_path_variable (n: READABLE_STRING_GENERAL): detachable STRING_32
-- Unencoded value related to variable name `n' -- Unencoded value related to variable name `n'
do do
if attached path_variable (n) as v then if attached path_variable (n) as v then
@@ -74,7 +74,7 @@ feature -- Query: url-decoded
end end
end end
url_decoded_variable (n: STRING): detachable STRING_32 url_decoded_variable (n: READABLE_STRING_GENERAL): detachable STRING_32
-- Unencoded value related to variable name `n' -- Unencoded value related to variable name `n'
do do
if attached variable (n) as v then if attached variable (n) as v then

View File

@@ -1,11 +1,11 @@
note note
description: "Summary description for {GW_CGI_CONNECTOR}." description: "Summary description for {EWF_CGI_CONNECTOR}."
author: "" author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_CGI_CONNECTOR EWF_CGI_CONNECTOR
inherit inherit
EWSGI_CONNECTOR EWSGI_CONNECTOR
@@ -20,8 +20,8 @@ feature -- Execution
req: EWSGI_REQUEST_FROM_TABLE req: EWSGI_REQUEST_FROM_TABLE
res: EWSGI_RESPONSE_STREAM_BUFFER res: EWSGI_RESPONSE_STREAM_BUFFER
do do
create req.make ((create {EXECUTION_ENVIRONMENT}).starting_environment_variables, create {GW_CGI_INPUT_STREAM}.make) create req.make ((create {EXECUTION_ENVIRONMENT}).starting_environment_variables, create {EWF_CGI_INPUT_STREAM}.make)
create res.make (create {GW_CGI_OUTPUT_STREAM}.make) create res.make (create {EWF_CGI_OUTPUT_STREAM}.make)
application.process (req, res) application.process (req, res)
end end

View File

@@ -6,7 +6,7 @@ note
revision: "$Revision$" revision: "$Revision$"
class class
GW_CGI_INPUT_STREAM EWF_CGI_INPUT_STREAM
inherit inherit
EWSGI_INPUT_STREAM EWSGI_INPUT_STREAM

View File

@@ -6,7 +6,7 @@ note
revision: "$Revision$" revision: "$Revision$"
class class
GW_CGI_OUTPUT_STREAM EWF_CGI_OUTPUT_STREAM
inherit inherit
EWSGI_OUTPUT_STREAM EWSGI_OUTPUT_STREAM

View File

@@ -1,12 +1,12 @@
note note
description: "Summary description for {GW_LIBFCGI_CONNECTOR}." description: "Summary description for {EWF_LIBFCGI_CONNECTOR}."
legal: "See notice at end of class." legal: "See notice at end of class."
status: "See notice at end of class." status: "See notice at end of class."
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_LIBFCGI_CONNECTOR EWF_LIBFCGI_CONNECTOR
inherit inherit
EWSGI_CONNECTOR EWSGI_CONNECTOR
@@ -22,8 +22,8 @@ feature {NONE} -- Initialization
initialize initialize
do do
create fcgi.make create fcgi.make
create {GW_LIBFCGI_INPUT_STREAM} input.make (fcgi) create {EWF_LIBFCGI_INPUT_STREAM} input.make (fcgi)
create {GW_LIBFCGI_OUTPUT_STREAM} output.make (fcgi) create {EWF_LIBFCGI_OUTPUT_STREAM} output.make (fcgi)
end end
feature -- Server feature -- Server

View File

@@ -6,7 +6,7 @@ note
revision: "$Revision$" revision: "$Revision$"
class class
GW_LIBFCGI_INPUT_STREAM EWF_LIBFCGI_INPUT_STREAM
inherit inherit
EWSGI_INPUT_STREAM EWSGI_INPUT_STREAM

View File

@@ -1,12 +1,12 @@
note note
description: "Summary description for {GW_LIBFCGI_OUTPUT_STREAM}." description: "Summary description for {EWF_LIBFCGI_OUTPUT_STREAM}."
legal: "See notice at end of class." legal: "See notice at end of class."
status: "See notice at end of class." status: "See notice at end of class."
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_LIBFCGI_OUTPUT_STREAM EWF_LIBFCGI_OUTPUT_STREAM
inherit inherit
EWSGI_OUTPUT_STREAM EWSGI_OUTPUT_STREAM

View File

@@ -1,11 +1,11 @@
note note
description: "Summary description for {GW_NINO_CONNECTOR}." description: "Summary description for {EWF_NINO_CONNECTOR}."
author: "" author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_NINO_CONNECTOR EWF_NINO_CONNECTOR
inherit inherit
EWSGI_CONNECTOR EWSGI_CONNECTOR
@@ -62,7 +62,7 @@ feature -- Server
local local
l_http_handler : HTTP_HANDLER l_http_handler : HTTP_HANDLER
do do
create {GW_NINO_HANDLER} l_http_handler.make_with_callback (server, "NINO_HANDLER", Current) create {EWF_NINO_HANDLER} l_http_handler.make_with_callback (server, "NINO_HANDLER", Current)
debug ("nino") debug ("nino")
if attached base as l_base then if attached base as l_base then
print ("Base=" + l_base + "%N") print ("Base=" + l_base + "%N")
@@ -76,8 +76,8 @@ feature -- Server
req: EWSGI_REQUEST_FROM_TABLE req: EWSGI_REQUEST_FROM_TABLE
res: EWSGI_RESPONSE_STREAM_BUFFER res: EWSGI_RESPONSE_STREAM_BUFFER
do do
create req.make (env, create {GW_NINO_INPUT_STREAM}.make (a_input)) create req.make (env, create {EWF_NINO_INPUT_STREAM}.make (a_input))
create res.make (create {GW_NINO_OUTPUT_STREAM}.make (a_output)) create res.make (create {EWF_NINO_OUTPUT_STREAM}.make (a_output))
req.set_meta_parameter ("RAW_HEADER_DATA", a_headers_text) req.set_meta_parameter ("RAW_HEADER_DATA", a_headers_text)
application.execute (req, res) application.execute (req, res)
end end

View File

@@ -5,7 +5,7 @@ note
revision : "$Revision$" revision : "$Revision$"
class class
GW_NINO_HANDLER EWF_NINO_HANDLER
inherit inherit
HTTP_CONNECTION_HANDLER HTTP_CONNECTION_HANDLER
@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
callback := a_callback callback := a_callback
end end
callback: GW_NINO_CONNECTOR callback: EWF_NINO_CONNECTOR
feature -- Access feature -- Access

View File

@@ -1,12 +1,12 @@
note note
description: "Summary description for {GW_NINO_INPUT_STREAM}." description: "Summary description for {EWF_NINO_INPUT_STREAM}."
legal: "See notice at end of class." legal: "See notice at end of class."
status: "See notice at end of class." status: "See notice at end of class."
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_NINO_INPUT_STREAM EWF_NINO_INPUT_STREAM
inherit inherit
EWSGI_INPUT_STREAM EWSGI_INPUT_STREAM
@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
set_nino_input (a_nino_input) set_nino_input (a_nino_input)
end end
feature {GW_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino feature {EWF_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino
set_nino_input (i: like nino_input) set_nino_input (i: like nino_input)
do do

View File

@@ -1,12 +1,12 @@
note note
description: "Summary description for {GW_NINO_OUTPUT_STREAM}." description: "Summary description for {EWF_NINO_OUTPUT_STREAM}."
legal: "See notice at end of class." legal: "See notice at end of class."
status: "See notice at end of class." status: "See notice at end of class."
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_NINO_OUTPUT_STREAM EWF_NINO_OUTPUT_STREAM
inherit inherit
EWSGI_OUTPUT_STREAM EWSGI_OUTPUT_STREAM
@@ -26,7 +26,7 @@ feature {NONE} -- Initialization
set_nino_output (a_nino_output) set_nino_output (a_nino_output)
end end
feature {GW_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino feature {EWF_NINO_CONNECTOR, EWSGI_APPLICATION} -- Nino
set_nino_output (o: like nino_output) set_nino_output (o: like nino_output)
do do

View File

@@ -27,7 +27,7 @@ feature {NONE} -- Implementation
create connector.make_with_base (app, a_base_url) create connector.make_with_base (app, a_base_url)
end end
connector: GW_NINO_CONNECTOR connector: EWF_NINO_CONNECTOR
-- Web server connector -- Web server connector
feature -- Status settings feature -- Status settings

View File

@@ -1,11 +1,11 @@
note note
description: "Summary description for {GW_BUFFERED_RESPONSE}." description: "Summary description for {EWF_BUFFERED_RESPONSE}."
author: "" author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_BUFFERED_RESPONSE EWF_BUFFERED_RESPONSE
inherit inherit
EWSGI_RESPONSE_BUFFER EWSGI_RESPONSE_BUFFER
@@ -130,7 +130,7 @@ feature -- Header output operation
write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]]) write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]])
-- Send headers with status `a_status', and headers from `a_headers' -- Send headers with status `a_status', and headers from `a_headers'
local local
h: GW_HEADER h: EWF_HEADER
i,n: INTEGER i,n: INTEGER
do do
set_status_code (a_status_code) set_status_code (a_status_code)

View File

@@ -1,10 +1,10 @@
note note
description: "Summary description for {GW_IN_MEMORY_RESPONSE}." description: "Summary description for {EWF_IN_MEMORY_RESPONSE}."
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_IN_MEMORY_RESPONSE EWF_IN_MEMORY_RESPONSE
inherit inherit
EWSGI_RESPONSE_BUFFER EWSGI_RESPONSE_BUFFER
@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
response_buffer: EWSGI_RESPONSE_BUFFER response_buffer: EWSGI_RESPONSE_BUFFER
header: GW_HEADER header: EWF_HEADER
body: STRING_8 body: STRING_8
@@ -93,7 +93,7 @@ feature -- Header output operation
write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]]) write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]])
-- Send headers with status `a_status', and headers from `a_headers' -- Send headers with status `a_status', and headers from `a_headers'
local local
h: GW_HEADER h: EWF_HEADER
i,n: INTEGER i,n: INTEGER
do do
set_status_code (a_status_code) set_status_code (a_status_code)

View File

@@ -1,11 +1,11 @@
note note
description: "Summary description for {GW_IN_MEMORY_RESPONSE_APPLICATION}." description: "Summary description for {EWF_IN_MEMORY_RESPONSE_APPLICATION}."
author: "" author: ""
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
deferred class deferred class
GW_IN_MEMORY_RESPONSE_APPLICATION EWF_IN_MEMORY_RESPONSE_APPLICATION
inherit inherit
EWSGI_APPLICATION EWSGI_APPLICATION
@@ -41,9 +41,9 @@ feature -- Execute
feature {NONE} -- Implementation feature {NONE} -- Implementation
new_response (req: EWSGI_REQUEST; a_res: EWSGI_RESPONSE_BUFFER): GW_IN_MEMORY_RESPONSE new_response (req: EWSGI_REQUEST; a_res: EWSGI_RESPONSE_BUFFER): EWF_IN_MEMORY_RESPONSE
do do
create {GW_IN_MEMORY_RESPONSE} Result.make (a_res) create {EWF_IN_MEMORY_RESPONSE} Result.make (a_res)
end end
note note

View File

@@ -1103,7 +1103,7 @@ feature {NONE} -- Implementation
report_bad_request_error (a_message: detachable STRING) report_bad_request_error (a_message: detachable STRING)
-- Report error -- Report error
local local
e: GW_ERROR e: EWF_ERROR
do do
create e.make ({HTTP_STATUS_CODE}.bad_request) create e.make ({HTTP_STATUS_CODE}.bad_request)
if a_message /= Void then if a_message /= Void then

View File

@@ -85,7 +85,7 @@ feature -- Header output operation
write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]]) write_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: STRING; value: STRING]])
-- Send headers with status `a_status', and headers from `a_headers' -- Send headers with status `a_status', and headers from `a_headers'
local local
h: GW_HEADER h: EWF_HEADER
i,n: INTEGER i,n: INTEGER
do do
set_status_code (a_status_code) set_status_code (a_status_code)

View File

@@ -1,12 +1,12 @@
note note
description: "Summary description for {GW_ERROR}." description: "Summary description for {EWF_ERROR}."
legal: "See notice at end of class." legal: "See notice at end of class."
status: "See notice at end of class." status: "See notice at end of class."
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
class class
GW_ERROR EWF_ERROR
inherit inherit
ERROR ERROR

View File

@@ -1,6 +1,6 @@
note note
description: "[ description: "[
Summary description for {GW_HEADER}. Summary description for {EWF_HEADER}.
Note the return status code is not part of the HTTP header Note the return status code is not part of the HTTP header
]" ]"
@@ -10,7 +10,7 @@ note
revision: "$Revision$" revision: "$Revision$"
class class
GW_HEADER EWF_HEADER
inherit inherit
ANY ANY

View File

@@ -61,18 +61,18 @@ feature -- Access
feature -- Query feature -- Query
path_parameter (a_name: STRING): detachable READABLE_STRING_32 path_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
-- Parameter value for path variable `a_name' -- Parameter value for path variable `a_name'
deferred deferred
end end
query_parameter (a_name: STRING): detachable READABLE_STRING_32 query_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
-- Parameter value for query variable `a_name' -- Parameter value for query variable `a_name'
--| i.e after the ? character --| i.e after the ? character
deferred deferred
end end
parameter (a_name: STRING): detachable READABLE_STRING_32 parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
-- Any parameter value for variable `a_name' -- Any parameter value for variable `a_name'
-- URI template parameter and query parameters -- URI template parameter and query parameters
do do

View File

@@ -23,11 +23,11 @@ feature {NONE} -- Initialization
feature -- Query feature -- Query
path_parameter (a_name: STRING): detachable STRING_32 path_parameter (a_name: READABLE_STRING_GENERAL): detachable STRING_32
do do
end end
query_parameter (a_name: STRING): detachable READABLE_STRING_32 query_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
do do
Result := request.parameter (a_name) Result := request.parameter (a_name)
end end

View File

@@ -31,12 +31,12 @@ feature -- Access
feature -- Query feature -- Query
path_parameter (a_name: STRING): detachable READABLE_STRING_32 path_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
do do
Result := uri_template_match.url_decoded_path_variable (a_name) Result := uri_template_match.url_decoded_path_variable (a_name)
end end
query_parameter (a_name: STRING): detachable READABLE_STRING_32 query_parameter (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
do do
Result := uri_template_match.url_decoded_query_variable (a_name) Result := uri_template_match.url_decoded_query_variable (a_name)
if Result = Void then if Result = Void then