Compare commits

...

413 Commits

Author SHA1 Message Date
Jocelyn Fiat
0375072540 updated git howto 2012-06-27 09:37:29 +02:00
Jocelyn Fiat
ad3b975d0a use svn export instead of svn checkout 2012-06-27 09:31:43 +02:00
Jocelyn Fiat
37e60a1f92 If library/cURL exists, do not copy cURL to contrib/library/network/cURL 2012-06-26 22:50:36 +02:00
Jocelyn Fiat
c7db4529a3 When installing, remove the folder "fonts" from the nino's example 2012-06-20 10:42:03 +02:00
Jocelyn Fiat
7273f5086d release v0.1 2012-06-20 10:16:11 +02:00
Jocelyn Fiat
4d7e427d7a removed git submodule for contrib/ise_library/cURL (replaced by git subtree merged) 2012-06-20 09:56:45 +02:00
Jocelyn Fiat
5059f4eb1c fixed path in uninstall_ewf.bat 2012-06-20 09:56:06 +02:00
Jocelyn Fiat
2ac7633b80 Replaced git submodule by subtree merged in contrib/ise_library/cURL 2012-06-20 09:55:34 +02:00
Jocelyn Fiat
e8fa284c79 Replaced git submodule by subtree merged in contrib/library/text/parser/json 2012-06-20 09:52:07 +02:00
Jocelyn Fiat
51b602b42a Fixed typo in linux command line (should use -option instead of --option ) 2012-06-19 23:46:58 +02:00
Jocelyn Fiat
50146cebf5 Put examples under examples/web/ewf/... 2012-06-19 15:24:16 +02:00
Jocelyn Fiat
1d425d2947 Fixed typo 2012-06-19 14:56:24 +02:00
Jocelyn Fiat
74061f83b3 fixed typo in dos batch script 2012-06-19 14:32:52 +02:00
Jocelyn Fiat
692ff182ca IfECF_PATH_UPDATER is defined, let's use it to find ecf_updater executable 2012-06-19 02:36:54 -07:00
Jocelyn Fiat
89110e3568 put everything under contrib for now, eventually svn checkout missing parts 2012-06-18 09:24:07 -07:00
Jocelyn Fiat
8e9db583cc fixed not enought argument for internal shell function (typo..) 2012-06-18 07:22:15 -07:00
Jocelyn Fiat
1509d68ca6 Final version of the install scripts. 2012-06-18 16:11:01 +02:00
Jocelyn Fiat
3709dec5e9 Fixed typo and path separators usage in dos batch scripts 2012-06-18 14:57:52 +02:00
Jocelyn Fiat
ba7886f73d Install script does the same on Windows and Linux 2012-06-18 14:51:26 +02:00
Jocelyn Fiat
0217083d79 improved install_ewf.sh , and removed usage of deleted router.ecf 2012-06-18 02:24:47 -07:00
Jocelyn Fiat
1260ebf999 Updated install_ewf.sh 2012-06-15 14:02:49 -07:00
Jocelyn Fiat
f3e1c524db Cleaned up compile_all.ini 2012-06-15 16:43:54 +02:00
Jocelyn Fiat
efeb372631 Updated draft library (consider it as draft quality) 2012-06-15 16:32:39 +02:00
Jocelyn Fiat
3389973a75 More flexible signature to allow detachable READABLE_STRING_8
Signed-off-by: Colin Adams <colinpauladams@gmail.com>
2012-06-15 16:28:01 +02:00
Jocelyn Fiat
5f3749e463 updated eel and eapml from more recent versions. 2012-06-15 14:57:12 +02:00
Jocelyn Fiat
0203e0fdc7 Moved eel and eapml under the contrib folder. 2012-06-15 14:24:23 +02:00
Jocelyn Fiat
12d56861e6 Fixing wrong path for ewsgi connector nino
(this was introduced recently when we moved folder location)
2012-06-15 14:15:44 +02:00
Jocelyn Fiat
23de980e57 added methods_head_get_post and methods_head_get 2012-06-15 10:54:53 +02:00
Jocelyn Fiat
ad5fed84ca Fixed previous commit where nino .ecf path was empty. 2012-06-15 10:53:32 +02:00
Jocelyn Fiat
aa38cf787a Merge branch 'master' of github.com:EiffelWebFramework/EWF 2012-06-14 14:17:02 +02:00
Jocelyn Fiat
3702842337 Updated structure of EWF, applied
Now "nino" is under contrib/library/network/server/nino  (as git merge subtree, and not anymore as submodule)
2012-06-14 13:35:08 +02:00
Jocelyn Fiat
2b730186a2 Fixing issue with HEAD and make_from_iterable 2012-06-14 12:28:52 +02:00
Jocelyn Fiat
dbd5e481b8 Merge remote-tracking branch 'ewf_wiki/master' 2012-06-13 23:10:04 +02:00
jocelyn
167c9403c0 Updated Home (markdown) 2012-06-13 14:08:17 -07:00
Jocelyn Fiat
b61cd7f512 Update master 2012-06-14 00:06:44 +03:00
Jocelyn Fiat
0a31cb38a3 Added "nino" subtree merged in contrib/library/network/server/nino 2012-06-13 22:45:50 +02:00
Jocelyn Fiat
db448001a1 Change structure of EWF, to follow better categorization 2012-06-13 22:32:17 +02:00
Jocelyn Fiat
3df1a26220 Better script, do not use default folder without asking. 2012-06-13 19:21:08 +02:00
Jocelyn Fiat
369a63c797 Added temporary scripts to install EWF on Windows 2012-06-13 18:51:19 +02:00
Jocelyn Fiat
52adff29aa updated script with official git repo 2012-06-11 15:20:41 +02:00
Jocelyn Fiat
8a58d62a7e Adopted convention name and value or values for WSF_VALUE and descendant (WSF_STRING ...)
kept `key' as redirection, and also string as obsolete redirection.
Router: provide a way to pass the request methods without using manifest string, thanks to WSF_ROUTER_METHODS
  so instead of using manifest array or manifest strings, just create an instance of WSF_ROUTER_METHODS
  for convenience, WSF_ROUTER provides a few `methods_...' returning prebuilt WSF_ROUTER_METHODS objects
Improved code related to unicode handling in URL, and parameters (before the framework was doing too much)
2012-06-11 14:58:13 +02:00
Jocelyn Fiat
36ed6f525c Update examples/tutorial/step_4.wiki 2012-05-30 11:10:56 +03:00
Jocelyn Fiat
815b62153a Update examples/tutorial/step_4.wiki 2012-05-30 11:10:25 +03:00
Jocelyn Fiat
a9cf373443 Update examples/tutorial/step_1.wiki 2012-05-30 10:57:36 +03:00
Jocelyn Fiat
97b549cf83 Added precompile for step_3 2012-05-30 09:53:00 +02:00
Jocelyn Fiat
7a619fa7a5 Sync with json 2012-05-30 09:52:41 +02:00
Jocelyn Fiat
0d5011b03e Added html encoding facility to WSF_STRING
Added WSF_STRING.is_empty
Improved HTML_ENCODER to be able to decode a STRING_8 or STRING_32 using general_decoded_string (s)
Improved tutorial example
Added precompilation for WSF library
Cosmetic (removed unused locals)
2012-05-30 09:36:55 +02:00
Jocelyn Fiat
8dd0cb29fa Applied recent changes made on EWF
Updated copyright
2012-05-28 11:21:28 +02:00
Jocelyn Fiat
445a27ddf8 Now inherit create_router ; but it is still possible to redefine it.
Added some wsf_reponse_message for redirection
Use "found" for the redirec_now ...
Added content to the tutorial
2012-05-28 10:54:05 +02:00
Jocelyn Fiat
171be24d2a Better us OK status for redirection by default 2012-05-25 23:56:10 +02:00
Jocelyn Fiat
fb7d5054da Merge branch 'master' of github.com:jocelyn/Eiffel-Web-Framework 2012-05-25 23:55:35 +02:00
Jocelyn Fiat
03bf467ee5 Added descriptions to WSF_RESPONSE about .send (mesg)
Fixed minor issues in other classes
2012-05-25 23:51:59 +02:00
Jocelyn Fiat
fd73af2cf8 Update examples/tutorial/step_3.wiki 2012-05-26 00:21:31 +03:00
Jocelyn Fiat
5504175d00 added eiffel code 2012-05-26 00:19:14 +03:00
Jocelyn Fiat
8283979a1e cosmetic 2012-05-26 00:17:27 +03:00
Jocelyn Fiat
3982c46ac4 Update examples/tutorial/step_3.wiki 2012-05-26 00:14:32 +03:00
Jocelyn Fiat
37a68dc778 Update examples/tutorial/step_3.wiki 2012-05-26 00:13:46 +03:00
Jocelyn Fiat
dafd8335d2 Update examples/tutorial/step_1.wiki 2012-05-26 00:10:20 +03:00
Jocelyn Fiat
4324b83cba fixed github wikitext usage 2012-05-26 00:08:28 +03:00
Jocelyn Fiat
b37a2bd17f Update examples/tutorial/step_4.wiki 2012-05-26 00:07:09 +03:00
Jocelyn Fiat
2a781b9081 Update examples/tutorial/step_3.wiki 2012-05-26 00:06:05 +03:00
Jocelyn Fiat
4bd8a24478 Update examples/tutorial/step_2.wiki 2012-05-26 00:05:06 +03:00
Jocelyn Fiat
f1e7639e6c Update examples/tutorial/step_1.wiki 2012-05-26 00:04:01 +03:00
Jocelyn Fiat
08347da643 Added more content to the tutorial 2012-05-25 22:55:15 +02:00
Jocelyn Fiat
6cff00428b Protected export of WSF_RESPONSE_MESSAGE.send_to
Added WSF_DEFAULT_RESPONSE_SERVICE
Added simple WSF_SERVICE_LAUNCHER_OPTIONS_FROM_INI class to load launch option from ini file.

Removed a few obsolete features
2012-05-25 20:17:55 +02:00
Jocelyn Fiat
aa6a1f2b8a Update examples/tutorial/README.wiki 2012-05-25 19:07:58 +03:00
Jocelyn Fiat
0f42eb2af0 Update examples/tutorial/README.wiki 2012-05-25 19:06:55 +03:00
Jocelyn Fiat
6d428cf078 added skeleton for tutorial_i text 2012-05-25 18:05:01 +02:00
Jocelyn Fiat
bd5238cf10 removed README.md 2012-05-25 17:57:13 +02:00
Jocelyn Fiat
e006b476af Removed to README.wiki 2012-05-25 17:56:19 +02:00
Jocelyn Fiat
f07fbbe450 Merge branch 'master' of github.com:EiffelWebFramework/EWF 2012-05-25 17:49:54 +02:00
Jocelyn Fiat
00a88e98e5 Updated indexing notes
started tutorial
Sync
2012-05-25 17:47:43 +02:00
Jocelyn Fiat
f1498e2a07 http_client PUT uploaded data is not correctly implemented using libcurl
so for now, let's use a real temporary file to use the upload filename implementation
2012-05-23 23:17:50 +02:00
Jocelyn Fiat
5899da6197 fixed typo in curl.ecf 2012-05-21 17:25:53 +02:00
Berend de Boer
2ff3cff70f Do not use 307 but 302 response 2012-05-21 17:18:12 +02:00
Jocelyn Fiat
8fddfd6d22 Added presentation of EWF from march 2012 2012-05-15 19:05:16 +02:00
jocelyn
81da23c472 Updated Home (markdown) 2012-05-15 10:01:41 -07:00
Jocelyn Fiat
a3ae808a59 misc: script to checkout the source code with svn 2012-05-15 18:53:58 +02:00
Jocelyn Fiat
1d82a55e76 added some git tips in doc 2012-05-15 18:38:16 +02:00
Jocelyn Fiat
cf68ce6681 Added subtree merged in doc/wiki 2012-05-15 18:26:08 +02:00
Jocelyn Fiat
1d89a2bd9f Removed submodule doc/wiki 2012-05-15 18:25:09 +02:00
Jocelyn Fiat
ddd9eb646d removed commented lines 2012-05-14 22:07:48 +02:00
Jocelyn Fiat
ff97b041a9 updated ChangeLog 2012-05-14 21:41:43 +02:00
Jocelyn Fiat
c3c27c5027 Rather use (READABLE_)STRING_GENERAL for argument instead of _8 or _32 variant
Better design to set the WSF_REQUEST.path_parameters
   especially handle the case where the request goes trought more than one route (could be the case when using WSF_ROUTING_HANDLER)
2012-05-14 18:12:28 +02:00
Jocelyn Fiat
64eebd32db Updated URI Template to follow official RFC6570 2012-05-14 18:11:12 +02:00
Jocelyn Fiat
278a71eaaf Reviewed WSF_REQUEST.item (..) and items to look into Form, Query, and Path (cookie are excluded for security)
Added WSF_REQUEST.path_parameter (a_name): detachable WSF_VALUE
   - fill path_parameters using `import_raw_path_parameters"
     when executing the route
   - reset to previous value with reset_path_parameters (..),
     just in case the request is executed via severals routes.
2012-05-07 23:16:52 +02:00
Jocelyn Fiat
e615026520 Reverted back to export upload_data and upload_filename to ANY (and related features) 2012-05-04 13:45:17 +02:00
Jocelyn Fiat
3a979915f5 Removed HTTP_CLIENT_SESSION.post_multipart .. because it was not doing what the name might evoque
Restrict export of HTTP_CLIENT_REQUEST_CONTEXT.upload_data and upload_filename (and related) to .._SESSION and .._REQUEST
   this is mainly internal data, and is more about implementation than interface
2012-05-04 12:37:51 +02:00
Jocelyn Fiat
4508a76683 Now the http_client will send the form parameters urlencoded if this is possible (instead of multipart form data)
Note for now, the library does not support sending file and form parameters at the same time.
2012-05-04 12:23:37 +02:00
Jocelyn Fiat
d40cc5d669 Fixed typo in .ecf .. curl instead of cURL 2012-05-03 18:46:04 +02:00
Jocelyn Fiat
3b27e093eb Added geant scripts to compile EWF 2012-05-03 18:29:46 +02:00
Jocelyn Fiat
eb04ac5405 Improved the libcurl implementation of http_client by adding HTTP_CLIENT_SESSION.is_debug: BOOLEAN
if True, this display verbose debug information in console
Implemented uploading of file for PUT and POST requests
Refactored LIBCURL_HTTP_CLIENT_REQUEST to free used pointer, and also ease extension of the class if needed.
Updated cURL library with addition of {CURL_EXTERNALS}.slist_free_all (..)
2012-05-03 16:21:42 +02:00
jfiat
c4e25a3091 Added {CURL_EXTERNALS}.slist_free_all
review#7828040

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@88674 8089f293-4706-0410-a29e-feb5c42a2edf
2012-05-02 19:58:42 +00:00
Jocelyn Fiat
31cf64f4ad do not use implicit conversion from HTTP_CONTENT_TYPE 2012-05-02 19:25:14 +02:00
Jocelyn Fiat
face4550f2 Fixed wrong signature should be READABLE_STRING_32 instead of _8 2012-05-02 19:22:39 +02:00
Jocelyn Fiat
ee0e3df05f Also removing the implicit conversion from STRING to HTTP_*_TYPE 2012-05-02 11:40:23 +02:00
Jocelyn Fiat
18ced46c99 Removed implicit conversion from HTTP_CONTENT_TYPE to STRING_8
because it could be a source of bug due to hidden conversion (and parameters)
Applied changes to autotest cases
Cosmetic
2012-05-02 11:35:53 +02:00
Jocelyn Fiat
7c95e514ad Added comments
Added `url' to compute the url from base_url, path and query parameters
2012-04-30 15:54:21 +02:00
Jocelyn Fiat
e304113984 Fixed error in URL encoding, according to the RFC3986, space should not be encoded with '+' but with percent encoding. 2012-04-30 15:53:44 +02:00
Jocelyn Fiat
07b3eddefe Fixed signature issue, the argument `name' should be READABLE_STRING_32 2012-04-30 15:51:10 +02:00
Jocelyn Fiat
dc2e535fe8 Code cleaning 2012-04-30 15:49:35 +02:00
Jocelyn Fiat
bd33aabd93 Added specific helper function related to `charset' parameter 2012-04-30 15:49:24 +02:00
Jocelyn Fiat
80a1c85844 added postcondition status_reason_phrase_unset to `set_status' 2012-04-27 08:52:58 +02:00
Jocelyn Fiat
9ba3caba12 cosmetic 2012-04-27 08:52:29 +02:00
Jocelyn Fiat
34c6288032 Fixed a last minute regression due to removal REQUEST.chunked_input 2012-04-13 17:19:14 +02:00
Jocelyn Fiat
21b03a05fd Added WSF_ROUTER.pre_route_execution_actions: ACTION_SEQUENCE [like route]
This way, one can add logger hook to router, to see which "route" was taken by the request.
2012-04-13 16:40:19 +02:00
Jocelyn Fiat
0bd2d16c12 Made WGI_CHUNKED_INPUT_STREAM inherits from WGI_INPUT_STREAM
Merged REQUEST.input and REQUEST.chunked_input
  Now REQUEST.input handles directly the chunked transfer encoding, or the non chunked.
Kept REQUEST.is_chunked_input since it matters that Content-Length is 0 even if there are input (chunked) data.
2012-04-13 16:33:49 +02:00
Jocelyn Fiat
e6a727ee42 Fixed compilation of samples 2012-04-12 12:51:52 +02:00
Jocelyn Fiat
1403cc5c09 Fixed compilation 2012-04-12 12:25:34 +02:00
Jocelyn Fiat
3bbf356f19 Missing commit related to changes on WSF_ROUTER 2012-04-12 11:59:14 +02:00
Jocelyn Fiat
b541efcc8f Now WGI_RESPONSE.set_status_code (..) has a new argument to pass optional custom reason phrase.
This is a minor breaking change (but prior to the first release, so acceptable)
   And then it is now possible to precise a custom reason phrase (useful for 4xx and 5xx response)

At the WSF_RESPONSE level, the status code is now sent only when the header are sent.
thus, it is possible to change the status code as long as no header is sent.
(in the future, we should also try to delay the sending of headers)

Removed WGI_RESPONSE.put_header_lines (..) which was not used, and WGI is not meant to provide such user friendly features
Now this is available directly on WSF_RESPONSE
2012-04-12 11:19:41 +02:00
Jocelyn Fiat
082def2b70 Merge branch 'master' of github.com:EiffelWebFramework/EWF 2012-04-06 15:52:03 +02:00
Jocelyn Fiat
79607600e6 updated to EiffelWebFramework/EWF 2012-04-06 16:27:22 +03:00
jocelyn
8870e19991 Updated Home (markdown) 2012-04-06 06:25:05 -07:00
Jocelyn Fiat
0b6b7f793c sync with json lib. 2012-04-06 11:31:57 +02:00
Jocelyn Fiat
badc2458c4 Sync with wiki 2012-04-06 11:29:07 +02:00
Jocelyn Fiat
d4208c59f3 Use https://github.com/EiffelWebFramework/EWF.git as master 2012-04-06 11:21:50 +02:00
Jocelyn Fiat
4bafa5b3c0 Added `transfered_content_length' to WSF_RESPONSE to provide the information to application
This can be used to build logs for instance.
2012-04-05 21:15:12 +02:00
Jocelyn Fiat
c89b19371e Relaxed WSF_REDIRECTION_RESPONSE.set_content (.., ..) to allow Void for content type
in order to use the one set in header or the default one.
2012-04-05 21:14:10 +02:00
Jocelyn Fiat
10ebc12852 Removed default handler for WSF_ROUTER
Added 	WSF_ROUTE to replace a TUPLE [H, C]
	WSF_ROUTER.route (req): detachable WSF_ROUTE
	WSF_ROUTER.execute_route (a_route, req, res)
	To help usage of Routers
Remove WSF_HANDLER_CONTEXT obsolete features.
Added comments
2012-04-05 21:13:04 +02:00
Jocelyn Fiat
593e48ec5b Merge remote-tracking branch 'remotes/eiffelworld/master' 2012-04-02 09:29:53 +02:00
Jocelyn Fiat
11b15ec5b7 Merge pull request #10 from oligot/unneeded_precondition
Unneeded precondition
2012-04-02 00:28:23 -07:00
Olivier Ligot
ff713a42ab [REM] Remove unneeded precondition 2012-04-02 09:28:22 +02:00
Olivier Ligot
155c45be6c [IMP] Ignore *.swp files 2012-04-02 09:28:10 +02:00
Jocelyn Fiat
09fa1adaab removed obsolete message. 2012-04-02 09:27:59 +02:00
Olivier Ligot
425c276051 [REM] Remove unneeded precondition 2012-03-27 11:30:42 +02:00
Olivier Ligot
0040e4b0d0 [IMP] Ignore *.swp files 2012-03-27 11:29:33 +02:00
Olivier Ligot
b862065c04 Merge branch 'master', remote branch 'upstream/master' 2012-03-26 17:19:02 +02:00
Jocelyn Fiat
874677ab7a Renamed same_media_type as same_simple_type
Added comments
2012-03-23 19:00:49 +01:00
Jocelyn Fiat
ed200b93dd updated tests.ecf 2012-03-23 18:40:29 +01:00
Jocelyn Fiat
bcccfb22ed Added HTTP_MEDIA_TYPE (maybe it will just replace the HTTP_CONTENT_TYPE later)
renamed .media_type as .simple_type for now
  allow more than one parameters
2012-03-23 18:39:19 +01:00
Jocelyn Fiat
5c98d7ba4e Use media_type as replacement for type_and_subtype_string in HTTP_CONTENT_TYPE 2012-03-23 16:49:13 +01:00
Jocelyn Fiat
40c6aff423 Added class HTTP_CONTENT_TYPE to help manipulation of Content-Type value
Now WSF_REQUEST return a HTTP_CONTENT_TYPE if available
Adapted WSF_MIME_HANDLER to use this new class
Added one manual autotest to test MIME handler
2012-03-23 16:40:13 +01:00
Jocelyn Fiat
ac9cbb0bd2 in WSF_RESPONSE, put_header' now call put_header_text'
Removed unused local variable
2012-03-21 14:49:09 +01:00
Jocelyn Fiat
95c3bbf6e5 Fixed very bad mistake where no Result was ever set for WSF_REQUEST.item (..) 2012-03-21 14:43:32 +01:00
Jocelyn Fiat
b955912dc2 fixed compilation issue (typo) 2012-03-20 16:17:43 +01:00
Jocelyn Fiat
50223b12f7 Do not try to compile_all in "dev" folder 2012-03-20 16:15:16 +01:00
Jocelyn Fiat
6c7ba93062 Reverted a previous change, we should not truncated Content-Type after ;
In the case of multipart/form-data  the parameter "boundary=" is essential
2012-03-20 14:35:04 +01:00
Jocelyn Fiat
743f26c376 Use WSF_DEFAULT_SERVICE for the test echo server 2012-03-20 12:18:44 +01:00
Jocelyn Fiat
d256ec3944 Fixing compilation of specific example using the WGI connector directly 2012-03-20 12:15:45 +01:00
Jocelyn Fiat
482f8e41e7 Added WSF_SERVICE.to_wgi_service to ease direct integration with existing WGI components 2012-03-20 11:40:13 +01:00
Jocelyn Fiat
9eef812795 Relaxed access to `send_to', now it is exported again to avoid breaking existing code. 2012-03-20 11:38:44 +01:00
Jocelyn Fiat
86fcaa2835 remove unused local variable 2012-03-20 11:15:14 +01:00
Jocelyn Fiat
897aeb3132 WSF_REQUEST.content_type should keep only the relevant part of the content type
and forget about the eventual parameters (charset, name) ...

  note: it is possible to query meta_string_variable ("CONTENT_TYPE")
        to get the complete Content-Type header
2012-03-20 11:12:18 +01:00
Jocelyn Fiat
48acdea73c Added HTTP_HEADER.(put|add)_content_type_with_parameters (...) 2012-03-20 11:08:52 +01:00
Jocelyn Fiat
cbaae12156 removed obsolete 2012-03-20 10:30:04 +01:00
Jocelyn Fiat
8344607eb6 Implemented WSF_RESPONSE.put_error (...) and related
Added WSF_RESPONSE.put_character
Renamed  WGI_OUTPUT_STREAM.put_character_8 as put_character  to follow style of put_string  (and not put_string_8)
Refactored the WSF_DEFAULT_SERVICE_LAUNCHER
Added WSF_DEFAULT_SERVICE to be more user friendly
Splitted the wsf/default/ libraries to have wsf/connector/... and being able to handle more than one connector in the same application
2012-03-20 10:29:55 +01:00
Jocelyn Fiat
71d5dc4795 Moved mime handler classes under wsf/src/mime/ 2012-03-20 08:38:38 +01:00
Jocelyn Fiat
3f0b745ecc removed unwanted rescue clause 2012-03-19 15:20:29 +01:00
Jocelyn Fiat
3432e2d8b2 Updating EWSGI specification classes 2012-03-19 15:06:50 +01:00
Jocelyn Fiat
fea0f115a0 Removed WGI_RESPONSE.write (..)
Replaced any internal call to WGI_RESPONSE.write () by the associated implementation (i.e  output.put_string (...)  )
Added WGI_OUTPUT_STREAM.put_crlf

Renamed WSF_RESPONSE.put_response (a_message) as  `send (a_message)'
WSF_RESPONSE_MESSAGE.send_to (res)  is now exported only to WSF_RESPONSE
2012-03-19 14:52:12 +01:00
Berend de Boer
84a12447db Avoid another indirection. 2012-03-19 14:02:13 +01:00
Berend de Boer
876f9e02b7 status must be set, else WGI_SERVICE.execute will report the
postcondition violation.

Conflicts:

	library/server/wsf/router/wsf_handler.e
2012-03-19 13:58:17 +01:00
Berend de Boer
e5323dd208 Minor code cleanup/typo fix. 2012-03-19 13:54:48 +01:00
Berend de Boer
77834a3dd8 Move wgi_service spec to its own directory else I get a class
conflicts with compile_ise.ecf generated by gexace.
2012-03-19 13:54:34 +01:00
Jocelyn Fiat
4906345a62 Improved comment in WSF_RESPONSE.put_response (..)
Added WSF_REDIRECTION_RESPONSE class
2012-03-19 12:32:12 +01:00
Jocelyn Fiat
487487ad44 Added WSF_RESPONSE_HANDLER based on WSF_RESPONSE_MESSAGE
The descendant has to implement the function

    response (ctx: C; req: WSF_REQUEST): WSF_RESPONSE_MESSAGE

Added related features and class in WSF_ROUTER to be able to use agent easily.
2012-03-19 12:04:46 +01:00
Jocelyn Fiat
ef5ba19c46 Refactored WSF_HANDLER_CONTEXT
- removed path_parameter
  - added `item' to include WSF_REQUEST.item
  - marked obsolete `parameter'

The goal is to remove confusion, remove URI_TEMPLATE specific `path_parameter'
and provide a way to use ctx.item (..) to also include meta variable, query, form, ... items
2012-03-19 10:21:29 +01:00
Jocelyn Fiat
b05ff01262 Use local variable to speed up access to `input' 2012-03-19 10:12:06 +01:00
Jocelyn Fiat
9f1940c46d Applied wsf_extension creation, and classes moved from wsf to wsf_extension 2012-03-16 15:17:22 +01:00
Jocelyn Fiat
f69ff42564 Created wsf_extension, and moved some classes from wsf to wsf_extension
WSF_HANDLER_HELPER
   WSF_RESOURCE_HANDLER_HELPER
   WSF_HANDLER_ROUTES_RECORDER
2012-03-16 14:12:02 +01:00
Jocelyn Fiat
eb3e9f2186 applied removal of HTTP_HEADER.put_status (..) 2012-03-16 13:53:22 +01:00
Jocelyn Fiat
03b10bdc14 Removed HTTP_HEADER.put_status (...)
It is not recommended to send the status code as part of the HTTP Header,
  so let's remove this ambiguity and do not encourage EWF user to use it
2012-03-16 13:35:52 +01:00
Jocelyn Fiat
46eb92ac37 Major renaming, adopt the WSF_ prefix for all classes under "wsf", and simplify some class names
Removed in WGI_INPUT_STREAM, the assertion "same_last_string_reference"
Copyright updates
2012-03-16 09:49:41 +01:00
jfiat
081392529c Better use C_STRING.substring (1, size) instead of C_STRING.string since we know the exact size
and this way, no risk with \0 character inside the string itself  (for binary data..)

Added comments

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@88401 8089f293-4706-0410-a29e-feb5c42a2edf
2012-03-13 17:36:43 +00:00
Jocelyn Fiat
e85213689e TCP_STREAM_SOCKET: added try_ready_for_reading' which is the same as ready_for_reading' but without any timeout 2012-03-13 17:38:33 +01:00
jvelilla
ab38345c25 Update readme.txt 2012-02-24 08:54:27 -02:00
jfiat
c873d62efa added JSON_OBJECT.is_empty: BOOLEAN 2012-02-21 10:07:58 +00:00
larryl
ad2a498fc0 Added cURL multi interface support (most APIs) issue#7305157
The multi interface offers several abilities that the easy interface doesn't. They are mainly:
1. Enable a "pull" interface. The application that uses libcurl decides where and when to ask libcurl to get/send data.
2. Enable multiple simultaneous transfers in the same thread without making it complicated for the application.
3. Enable the application to wait for action on its own file descriptors and curl's file descriptors simultaneous easily.
		
More info: http://curl.haxx.se/libcurl/c/libcurl-multi.html



git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@88299 8089f293-4706-0410-a29e-feb5c42a2edf
2012-02-14 02:52:03 +00:00
manus
1ab3832685 Removed the ECF bounds license file and replaced them with `license.lic' files.
Made sure all license are the Eiffel Forum License 2.

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@88213 8089f293-4706-0410-a29e-feb5c42a2edf
2012-01-20 16:35:05 +00:00
jfiat
a6c52c0a7e Renamed JSON_STRING.unescaped_string as unescaped_string_8
+ code cleaning
2012-01-13 17:57:49 +00:00
jfiat
d67e01eea6 Better support for special character and unicode (\n \r \" ... and \uXXXX where XXXX is an hexadecimal value)
Added features to JSON_STRING
  - make_json_from_string_32 (READABLE_STRING_32)
  - escaped_string_8: STRING_8
  - escaped_string_32: STRING_32
Added associated autotests
2012-01-13 17:26:23 +00:00
Jocelyn Fiat
8b4f774bab Handling bad incoming request (keep a check assertion to help during debugging period) 2011-12-12 10:44:50 +01:00
Jocelyn Fiat
59505ccdc4 various renaming and preparation to merge Thread and SCOOP implementation of Eiffel Web Nino 2011-12-01 17:58:01 +01:00
Jocelyn Fiat
800815c8dd Added put_readable_string_8 to avoid call to .as_string_8 2011-12-01 17:48:15 +01:00
jvelilla
faafa894c2 Merge pull request #9 from jocelyn/master
Removed main thread and removed shared configuration class
2011-12-01 01:23:35 -08:00
Jocelyn Fiat
89cd5a3b44 Removed initial Thread for the HTTP_HANDLER, this is not needed here
Removed HTTP_SERVER_SHARED_CONFIGURATION from the library ... not needed by the library.
Added HTTP_SERVER_SHARED_CONFIGURATION  to the example to show how to share the configuration, if needed
2011-11-30 19:05:16 +01:00
jfiat
2b7043f670 Fixed bug#18008: Function {CURL_OPT_CONSTANTS}.libcurl_version has wrong type
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@88050 8089f293-4706-0410-a29e-feb5c42a2edf
2011-11-28 08:21:54 +00:00
Jocelyn Fiat
51b912c4f8 Merge branch 'master' of https://github.com/jvelilla/Eiffel-Web-Framework.wiki 2011-11-25 13:18:46 +01:00
jvelilla
7dd9a30740 Updated HTTP Library Features (markdown) 2011-11-24 09:38:40 -08:00
jvelilla
92c58bbbe0 Updated HTTP Library Features (markdown) 2011-11-24 09:37:45 -08:00
jvelilla
f4b621ba08 Updated HTTP Library Features (markdown) 2011-11-24 09:34:35 -08:00
jvelilla
dc0c90ab46 Updated HTTP Library Features (markdown) 2011-11-24 09:32:07 -08:00
jvelilla
fdef9b0c8f Updated HTTP Library Features (markdown) 2011-11-24 09:23:42 -08:00
jvelilla
40ec2f6419 Created HTTP client library (markdown) 2011-11-24 09:22:12 -08:00
jfiat
1b446caa27 Removing autotest dotnet target, since Autotest does not support .Net platform for now 2011-11-21 13:54:50 +00:00
jfiat
24b1be7482 Fixed code from autotest tests to remove warnings
Fixed getest ejson_test.ecf configuration file
Added script to allow using getest from Windows.

Note: I  did not fixed warning from getest tests, we should apply same change already made for autotest.
      it seems autotest and getests are doing the same checking, 
      I would suggest to either remove getest files or find a way to share test code between getest and autotest tests.
2011-11-21 09:20:46 +00:00
Jocelyn Fiat
713978d70f Using `is_verbose' instead of debug clause "nino" 2011-11-14 16:32:28 +01:00
Jocelyn Fiat
b78c44f4a1 Applied the removal of HTTP_INPUT_STREAM and HTTP_OUTPUT_STREAM to the example. 2011-11-14 16:32:09 +01:00
jvelilla
9f2abab670 Merge pull request #8 from jocelyn/master
Removed HTTP_(INPUT,OUTPUT)_STREAM classes
2011-11-11 03:57:24 -08:00
Jocelyn Fiat
a46c08de11 Removed HTTP_(INPUT,OUTPUT)_STREAM, since it is unlikely that we use something else than TCP_STREAM_SOCKET
This way, we remove one indirection for users, and get smaller code.
2011-11-10 22:05:34 +01:00
Jocelyn Fiat
abd67c8caa applied recent changes related to HTTP_HANDLER.make 2011-11-04 20:27:30 +01:00
Jocelyn Fiat
53496e010b removed useless "a_name" argument
Fixed typo in on_launched
2011-11-04 19:09:49 +01:00
jvelilla
cef6f30251 Merge pull request #6 from jocelyn/master
new event on_launched and on_stopped to ease integration with launching application
2011-11-04 03:51:27 -07:00
Jocelyn Fiat
00ffa50054 added events on_launched and on_stopped to ease integration with launching application 2011-11-04 11:46:56 +01:00
jvelilla
cac126f2f1 Merge pull request #5 from jocelyn/master
Please pull this change
2011-11-03 10:27:27 -07:00
Jocelyn Fiat
c53d4d37a7 added access to the effective port that the server is listening to (useful when we set port to 0 it use a random free port)
added verbose , so that we write message to the console only if desired.
2011-11-03 18:13:55 +01:00
larryl
f17f785ee3 Added simple readme file to cURL library. It tells user the cURL library need 3 DLLs to work.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@87608 8089f293-4706-0410-a29e-feb5c42a2edf
2011-10-25 08:03:57 +00:00
Jocelyn Fiat
7fd4cdbe44 Code cleaning, and nicer output under debug clause 2011-10-21 13:40:56 +02:00
Jocelyn Fiat
e66c666e64 removed unwanted first line 2011-10-12 22:56:01 +03:00
Jocelyn Fiat
4cd1b67607 Cosmetic 2011-10-07 14:40:04 +02:00
Jocelyn Fiat
34bb793599 Added license.lic and copyright to Javier 2011-10-07 14:36:20 +02:00
jfiat
c836d75191 Added more conversion, and accept READABLE_STRING_8 as argument for make_json 2011-10-07 12:25:00 +00:00
jfiat
3739909e43 Minor changes + cosmetics
Added conversion from STRING to JSON_STRING to help users.
2011-10-07 12:19:27 +00:00
jfiat
19637b616b Be sure to set the Result /= 0 (i.e ECURLE_OK) when error occurred.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@87340 8089f293-4706-0410-a29e-feb5c42a2edf
2011-09-27 08:06:20 +00:00
jocelyn
2b112da43d Updated EWSGI specification (markdown) 2011-09-26 08:18:15 -07:00
jocelyn
aaf8af85fd Updated EWSGI (markdown) 2011-09-26 07:53:32 -07:00
jocelyn
beb721ed4b Updated EWSGI (markdown) 2011-09-26 07:51:08 -07:00
jocelyn
2407cb6a63 Updated EWSGI (markdown) 2011-09-26 07:50:17 -07:00
Jocelyn Fiat
58767bb1c1 add precondition saying the request line should not be empty 2011-09-21 15:26:23 +02:00
jfiat
8034123683 Added a few missing CURLOPT_ constants
Grouped constants by category

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@87244 8089f293-4706-0410-a29e-feb5c42a2edf
2011-09-20 14:06:20 +00:00
jocelyn
820bd7bd6f Updated EWSGI (markdown) 2011-09-07 05:30:29 -07:00
jocelyn
4a7b6ecc94 Updated EWSGI (markdown) 2011-09-05 06:59:49 -07:00
jocelyn
28d03ddf2a Updated EWSGI (markdown) 2011-09-05 06:58:15 -07:00
jocelyn
d0bb906a96 Updated EWSGI (markdown) 2011-09-05 06:56:42 -07:00
jocelyn
597f4bc6bd Updated EWSGI (markdown) 2011-09-05 06:54:29 -07:00
jocelyn
4744bb15c3 Updated EWSGI (markdown) 2011-09-05 06:15:07 -07:00
jocelyn
d0576c6829 Updated EWSGI Open Questions (markdown) 2011-09-05 06:03:33 -07:00
jvelilla
9fef2d71f0 Fixed ecf files that cause a cat-call in the example
web server.
2011-09-05 09:18:39 -03:00
Jocelyn Fiat
060f1482fe Changed prefix class name from EWSGI_ to WGI_
changes in interface for REQUEST and RESPONSE
2011-08-30 19:16:40 +02:00
jocelyn
d14e65fdc0 Updated EWSGI : open questions (markdown) 2011-08-02 07:40:10 -07:00
jocelyn
c337f49c87 Updated EWSGI (markdown) 2011-08-02 07:39:45 -07:00
jocelyn
ed587493e9 Updated Home (markdown) 2011-08-02 07:39:34 -07:00
jocelyn
e2fb499853 Updated EWSGI (markdown) 2011-08-02 07:35:47 -07:00
jocelyn
59d4eb528c Created EWSGI (markdown) 2011-08-02 07:35:28 -07:00
jocelyn
afb3890f50 Updated EWSGI: open questions (markdown) 2011-08-02 07:34:52 -07:00
jocelyn
077c140576 Updated Home (markdown) 2011-08-02 07:33:41 -07:00
jocelyn
75dc9fac3e Updated Source structure (markdown) 2011-08-02 07:32:31 -07:00
jocelyn
637909614b Updated EWSGI: open questions (markdown) 2011-08-02 07:31:08 -07:00
jocelyn
45db7eb537 Created EWSGI: open questions (markdown) 2011-08-02 07:30:35 -07:00
jocelyn
8a3b5a77e3 Updated EWSGI specification: difference in main proposals (markdown) 2011-08-02 02:57:33 -07:00
jocelyn
4ab99dcd4a Created EWSGI specification: difference in main proposals (markdown) 2011-08-02 02:52:31 -07:00
jocelyn
cefc95e56f added current eiffel interfaces for APPLICATION, REQUEST and RESPONSE_BUFFER 2011-08-02 01:02:01 -07:00
jocelyn
0194450892 Updated EWSGI specification (markdown) 2011-08-02 00:21:53 -07:00
jocelyn
a2a1f89299 Updated EWSGI specification (markdown) 2011-08-01 01:19:54 -07:00
jocelyn
b869eb7333 Updated Home (markdown) 2011-08-01 00:36:52 -07:00
jocelyn
7680d071f1 Updated Community collaboration (markdown) 2011-07-29 06:15:51 -07:00
jocelyn
c7f4f45f5e Updated Libraries (markdown) 2011-07-21 10:01:04 -07:00
Javier Velilla
9dd1439a2f Refactor to use the new library structure convention. 2011-07-15 08:15:31 -03:00
seibo
e1120040bb Updated EWSGI specification (markdown) 2011-07-12 16:02:30 -07:00
seibo
e63553555d Updated EWSGI specification (markdown) 2011-07-12 15:57:54 -07:00
seibo
4904aba360 Updated EWSGI specification (markdown) 2011-07-12 15:48:53 -07:00
seibo
cc7e54a19b Updated EWSGI specification (markdown) 2011-07-12 14:34:05 -07:00
jocelyn
8389829067 Updated Libraries (markdown) 2011-07-12 10:42:23 -07:00
jocelyn
4880d23846 Updated Libraries (markdown) 2011-07-12 10:42:09 -07:00
jocelyn
d409eac9d6 Updated Libraries (markdown) 2011-07-12 10:41:22 -07:00
jocelyn
13993197d3 Created Libraries (markdown) 2011-07-12 10:39:15 -07:00
jocelyn
d5288a4ebe Updated Home (markdown) 2011-07-12 10:33:14 -07:00
jvelilla
4a87d5822b Merge pull request #2 from jocelyn/master
Please consider pulling from my repository
2011-07-12 03:36:36 -07:00
Jocelyn Fiat
de77802546 Merge branch 'master' of github.com:jocelyn/EiffelWebNino 2011-07-12 11:09:59 +02:00
Jocelyn Fiat
f7cf91500c let's have a nino-safe.ecf and also a nino.ecf for non void-safe system 2011-07-12 11:07:09 +02:00
jvelilla
05b4bd90f5 Added test cases from getest to autotest. First version. 2011-07-11 12:07:05 +00:00
jocelyn
6309bbfa52 Updated The Eiffel Web Server Gateway Interface (markdown) 2011-07-08 05:39:44 -07:00
jfiat
6188f99615 added run_autotest.bat scripts 2011-07-08 10:10:40 +00:00
seibo
ab924d3596 Updated The Eiffel Web Server Gateway Interface (markdown) 2011-07-07 16:11:10 -07:00
seibo
13515504c3 Updated The Eiffel Web Server Gateway Interface (markdown) 2011-07-07 15:58:16 -07:00
seibo
831f73b308 Updated EWSGI specification (markdown) 2011-07-07 15:57:14 -07:00
seibo
6cba9a912f Created EWSGI/specification (markdown) 2011-07-07 15:56:14 -07:00
Jocelyn Fiat
c6162aea7e Merge branch 'master' of github.com:jocelyn/Eiffel-Web-Framework.wiki 2011-07-07 16:48:52 +02:00
jfiat
28a699e5f2 Converted the autotest test suite to void-safety
+ cosmetics
2011-07-07 14:39:06 +00:00
jfiat
591cfb6cfa Now if you want to use the json utilities for gobo, you just need to include the json_gobo_extension.ecf (note that the related gobo classes are not void-safe)
+ cosmetics
2011-07-07 14:03:36 +00:00
jocelyn
1f385658ed Updated Source structure (markdown) 2011-07-07 06:41:47 -07:00
jvelilla
f4c472cb9f Updated eJSON to use Eiffel 6.8 version.
Basically the changes are:

Replace ? by detachable
indexing by note
removing `is' from features, and in some places replaced by =
In the ecf now we need to include every gobo library, because the gobo.ecf, exclude libraries that are needed.
TODO: the test-suite is not void-safety.
2011-07-07 12:03:25 +00:00
jocelyn
36539997cd Updated Community collaboration (markdown) 2011-07-07 01:24:05 -07:00
jvelilla
94c5c90eaa Updated History and Readme files. 2011-07-06 22:12:26 +00:00
jocelyn
b57450d762 Updated Home (markdown) 2011-07-06 03:48:31 -07:00
jocelyn
398139ee19 Updated Home (markdown) 2011-07-06 03:47:02 -07:00
jocelyn
843a3efe0f Updated Home (markdown) 2011-07-06 03:45:59 -07:00
jocelyn
5a4a749c0f Updated Tasks Roadmap (markdown) 2011-07-06 02:24:18 -07:00
jocelyn
fbbfc784b1 Created Community collaboration (markdown) 2011-07-06 02:22:41 -07:00
jocelyn
dd7b62f7a1 Updated Home (markdown) 2011-07-06 02:14:45 -07:00
jocelyn
b86057e6a4 Created Spec server architecture (markdown) 2011-07-06 02:05:43 -07:00
jocelyn
6bdfb1d74a Updated Home (markdown) 2011-07-06 02:05:17 -07:00
Jocelyn Fiat
baae1daa85 Added server side architecture for EWSGI 2011-07-06 11:03:21 +02:00
jocelyn
c9c2b37070 Created Task json (markdown) 2011-07-05 05:37:20 -07:00
jocelyn
5f5a8c6daf Updated Tasks Roadmap (markdown) 2011-07-05 05:34:06 -07:00
jocelyn
e0eedef3a7 Updated Source structure (markdown) 2011-07-05 05:33:22 -07:00
jocelyn
f9a79c0800 Created Source structure (markdown) 2011-07-05 05:31:59 -07:00
jocelyn
7f35ca21e2 Updated Home (markdown) 2011-07-05 05:22:01 -07:00
jocelyn
71cdfe18ab Updated Home (markdown) 2011-07-05 05:01:45 -07:00
jocelyn
d9b52d2691 Updated Tasks Roadmap (markdown) 2011-07-05 02:43:47 -07:00
jocelyn
0b7165b260 Updated Eiffel-Web-Framework (markdown) 2011-07-05 02:40:41 -07:00
jocelyn
057cec2b44 Updated Tasks Roadmap (markdown) 2011-07-05 02:38:30 -07:00
jocelyn
23d8adaa3d Updated Tasks (markdown) 2011-07-05 02:38:05 -07:00
jocelyn
aca99fe6d4 Created Tasks (markdown) 2011-07-05 02:37:56 -07:00
jocelyn
1782fc9f4d Updated Home (markdown) 2011-06-30 02:24:59 -07:00
jocelyn
509375f7e6 Updated Home (markdown) 2011-06-30 02:24:23 -07:00
Eiffel-World
58f72fdf18 Initial Commit 2011-06-30 02:09:51 -07:00
Javier Velilla
32ff399442 Merge branch 'jocelyn' 2011-06-23 22:59:41 -03:00
Jocelyn Fiat
c7440a2ca0 Fixed the HTTP_SERVER.shutdown_server 2011-06-01 19:13:09 +02:00
Jocelyn Fiat
63cd0610ec Fixed remote info computing 2011-05-31 14:29:16 +02:00
Javier Velilla
c772fc5194 Commit merge jocelyn changes 2011-05-30 23:16:58 -03:00
Jocelyn Fiat
0fda0dc34c left adjust request_header_map items. 2011-05-30 22:26:35 +02:00
Jocelyn Fiat
f22f42c463 Fixed nino.ecf by removing the root class since this is a library config file. 2011-05-30 11:31:53 +02:00
Javier Velilla
569a587ffd Update Readme files 2011-05-28 20:15:48 -03:00
Javier Velilla
6317ca2fe5 Merge git@github.com:jvelilla/EiffelWebNino
Conflicts:
	README
2011-05-28 19:53:47 -03:00
Javier Velilla
12d9dcfff5 Commit Jocelyn changes. 2011-05-28 19:40:31 -03:00
Jocelyn Fiat
824750e748 Don't forget to reset request data 2011-05-27 22:05:56 +02:00
Jocelyn Fiat
c544da3561 Reset values after processing the request
Added port information when starting the server
2011-05-27 19:44:50 +02:00
Jocelyn Fiat
e5e9f9486e Added force_single_threaded option
Modified the interface of process request
default port is now 80
2011-05-27 19:08:35 +02:00
Jocelyn Fiat
720351871b fixed typo in assertion 2011-05-27 16:03:50 +02:00
Jocelyn Fiat
54b95650c5 Moving things around to make it more structured. and turn into library 2011-05-27 15:21:30 +02:00
Jocelyn Fiat
c553bd1e1e abstracted the HTTP_HANDLER
to let the user integrate at the level of its choice
(either very early so handle itself the header handling, or later to reuse existing code)
2011-05-27 13:07:06 +02:00
Jocelyn Fiat
64cf2b6936 A few change to make it more customizable
and prepare integration to EiffelWebReloaded (see on github)
2011-05-26 17:23:21 +02:00
jvelilla
85cf39f3c6 Edited README via GitHub 2011-05-21 09:11:32 -07:00
Javier Velilla
af852498be Added process directory 2011-05-21 12:46:45 -03:00
Javier Velilla
dfa30471e3 Import HTTPD Eiffel 2011-05-20 08:58:26 -03:00
Javier Velilla
094dc09354 first commit 2011-05-20 08:53:04 -03:00
manus
3af8d34f0f * Use READABLE_STRING_GENERAL instead of STRING_GENERAL for routines expecting a string. This enables us to use IMMUTABLE_STRINGs as argument without conversion.
* As a consequence we are also now using `same_string' instead of `is_equal' to compare strings which will handle any type of strings.
* Enforced the rule that arguments are READABLE_STRING_GENERAL and queries are STRING_32 when unicode is expected.
* The most delicate part of the change was the update of the encoding library. Now we have two queries:last_converted_string_32 and last_converted_string_8 in addition of the typeless last_converted_string. The idea is that if you know that you are converting to something where characters are at least 2 bytes wide, you know that you have to use STRING_32, otherwise it will be STRING_8.
* Unlike STRING_GENERAL, READABLE_STRING_GENERAL does not have a conversion to STRING_32 and thus in a few places we had to use `as_string_32' for explicit conversion which I found better.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@85350 8089f293-4706-0410-a29e-feb5c42a2edf
2011-01-13 23:53:42 +00:00
larryl
d0ca77f104 Added linux-x86' and linux-x86-64' to SVN ignore list
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@83576 8089f293-4706-0410-a29e-feb5c42a2edf
2010-06-15 09:23:11 +00:00
manus
3c0d342704 Updated to match the new config.sh file used on Windows, so that it can work with MSC (already the case) but also with MinGW on a multiprocessor architecture.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@83539 8089f293-4706-0410-a29e-feb5c42a2edf
2010-06-11 23:30:18 +00:00
jfiat
e78d34774e missing curlopt_userpwd case for `is_valid'
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@83514 8089f293-4706-0410-a29e-feb5c42a2edf
2010-06-10 12:31:16 +00:00
larryl
eb57cb1973 Added CURLOPT_CUSTOMREQUEST
More info please check:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

Contributed by Javier Hector

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@83453 8089f293-4706-0410-a29e-feb5c42a2edf
2010-06-08 03:09:06 +00:00
manus
3d669e3043 Moved the experimental branch to be the default for libraries.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@82581 8089f293-4706-0410-a29e-feb5c42a2edf
2010-03-16 03:07:44 +00:00
jvelilla
e638eeaae4 Updated skip_white_spaces, now check %U and %T codes 2010-03-16 00:08:37 +00:00
jvelilla
5d63c63a39 Undo changes to is_a_valid_number, because it's doesn't follow the JSON spec. Tests : fail13.json, fail29.json and fail30.json are valid with this implementation, so we go back to the previous implementation. 2010-03-10 11:16:16 +00:00
jvelilla
a863e495ae Updated test_json_fail18 , it's a valid JSON, maybe we need to rename this to test_json_pass4 and the file fail18.json to pass4.json 2010-03-10 11:07:33 +00:00
jvelilla
327196a3cf Removed obsolete cluster. 2010-03-09 11:41:08 +00:00
jvelilla
805874dc9c Added autotest test suite 2010-03-09 11:37:55 +00:00
paul.cohen
11256d697d Added getest based test program 2010-03-08 23:46:59 +00:00
jvelilla
b389d532b7 Updated Eiffel configuration file, updated to the new clusters 2010-03-08 23:43:35 +00:00
paul.cohen
a0e570226c Ported r75 (all JSON value classes) from POC_CONVERTERS_FACTORY branch to trunk 2010-03-08 22:45:41 +00:00
paul.cohen
2710cae1da Merged converters and factory classes from POC_CONVERTERS_FACTORY to trunk 2010-03-08 15:35:32 +00:00
paul.cohen
8cd53b87eb New directory layout created 2010-03-08 15:28:47 +00:00
paul.cohen
6bef8ec387 Added new top level directories; library, test, build and example 2010-03-08 15:08:37 +00:00
jvelilla
f86abed2ff Added History, Readme and License files 2010-03-05 09:18:38 +00:00
manus
683aa808ad In non-experimental version of EiffelStudio we do not distribute void-safe version of the libraries as it does not make sense (since it would convey the message that it is void-safe when it is actually not void-safe).
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@81549 8089f293-4706-0410-a29e-feb5c42a2edf
2009-11-14 00:46:07 +00:00
larryl
7717502363 Added useful comments
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@81175 8089f293-4706-0410-a29e-feb5c42a2edf
2009-10-15 14:38:50 +00:00
larryl
eefd98c630 Added automatic license files for docking and cURL library
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@80413 8089f293-4706-0410-a29e-feb5c42a2edf
2009-08-25 09:40:26 +00:00
jvelilla
7a31e80f90 Simples fixes to the parser, add is_valid_start_symbol and updated parse_json. 2009-08-14 11:19:54 +00:00
jvelilla
aed8d1a516 Added set_representation feature. 2009-08-14 11:09:38 +00:00
jfiat
ab19cc2b16 use item (i) instead [i] 2009-08-13 06:32:32 +00:00
jfiat
d4da754a9c Optimized code, and removed extra dependencies.
Added void-safe version
2009-08-04 12:01:03 +00:00
larryl
ee8bce82b2 Added curlopt_proxy constant
Contributed by Heiko Gering

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@79745 8089f293-4706-0410-a29e-feb5c42a2edf
2009-07-13 09:07:05 +00:00
manus
764372f072 Updated safe-version to also use the API wrapper library otherwise it does not compile.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@78752 8089f293-4706-0410-a29e-feb5c42a2edf
2009-05-18 21:06:56 +00:00
dfurrer
8ddc27b9cb - Adding the necessary platform-specific implementations (stubs atm) to build EiffelStudio using the Cocoa Vision2 implementation (without GTK+ dependencies).
- There is a new target "bench_cocoa" in ec.ecf which builds the native Mac version of EiffelStudio 



git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@78745 8089f293-4706-0410-a29e-feb5c42a2edf
2009-05-18 16:06:27 +00:00
larryl
5d63551002 Updated cURL library to use API wrapper library
Then removed useless classes such as {API_LOADER} {API_LOADER_IMP}, removed useless library references such as Vision2 and WEL

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@78736 8089f293-4706-0410-a29e-feb5c42a2edf
2009-05-18 04:33:10 +00:00
manus
03851ac02e Updated to 1-5-0 schema version of ECFs.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@78475 8089f293-4706-0410-a29e-feb5c42a2edf
2009-05-01 21:42:03 +00:00
jfiat
7e2a847e39 cosmetic
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@78170 8089f293-4706-0410-a29e-feb5c42a2edf
2009-04-10 08:45:10 +00:00
manus
0759dfe1a7 Use new `note' syntax.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@78146 8089f293-4706-0410-a29e-feb5c42a2edf
2009-04-09 18:51:20 +00:00
jfiat
dae6d64f82 Added curl_easy_getinfo. Associated constants and also CURLOPT_USERPWD.
Minor optimization and cosmetics.

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@77794 8089f293-4706-0410-a29e-feb5c42a2edf
2009-03-19 08:18:02 +00:00
jfiat
f1f1f5fbf6 Fixed typo 2009-03-18 16:46:27 +00:00
jfiat
548a320448 Cosmetic + Optimization + Assertion + Void-safety
(no significant interface changes)
2009-03-18 15:29:41 +00:00
jfiat
6bb5b0bac8 Removed erroneous precondition `exists', since we can call slist_append with null pointer to get an initialized pointer.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@77774 8089f293-4706-0410-a29e-feb5c42a2edf
2009-03-18 08:21:46 +00:00
manus
e3d8fbb263 Removed duplicated `local_realclean' definition which could cause a Makefile execution to fail when
launching multiple jobs on a slow file system and slow OS.
Fixed the one already committed for EiffelNet as we had removed `local_clean' which is still needed for
  the `clean' target.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@77516 8089f293-4706-0410-a29e-feb5c42a2edf
2009-03-04 00:51:24 +00:00
larryl
caf6d8c528 Added features related with curlopt_readfunction (for setting and using read function), so users can read data from local machine and send the data to server.
Added curlopt_put and other constance to {CURL_OPT_CONSTATNS} which used by {CURL_EASY_EXTERNALS}

Contributed by Heiko Gering 

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@77404 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-27 13:02:12 +00:00
manus
e880fbde14 Use new syntax for object test and attached/detachable type.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@77298 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-24 23:44:31 +00:00
manus
9e27a52670 To make transition easier, we are preserving `make_from_c' as creation procedure in the STRING classes
and therefore we should use it instead of `make_from_c_pointer' that will be obsoleted soon.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@77047 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-06 22:45:24 +00:00
king
816e5b4d6c Fixed typo from previous commit
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@76967 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-04 17:02:38 +00:00
king
9a4a1a3a40 Fixed typo from previous commit
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@76966 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-04 17:01:51 +00:00
manus
93b74d0d5e Added back vision2 since used for the API_LOADER_IMP on Unix but this time with an explicit conditional.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@76965 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-04 16:58:59 +00:00
manus
925fdcd979 Made the cURL library void-safe.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@76961 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-04 01:05:57 +00:00
manus
2f1e4e561b Removed vision2 since not used.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@76960 8089f293-4706-0410-a29e-feb5c42a2edf
2009-02-04 01:04:28 +00:00
manus
5506ab09dc Removal of `is' keyword.
Replacement of `is' by `=' for constant definitions.
Replaced `indexing' by `note'.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@76420 8089f293-4706-0410-a29e-feb5c42a2edf
2008-12-29 20:27:11 +00:00
manus
544b5784ae Moved API_LOADER class to where it was used, i.e. the cURL library.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@75972 8089f293-4706-0410-a29e-feb5c42a2edf
2008-12-01 19:34:30 +00:00
jvelilla
1359a1ceae Add descriptions.
Change in skip_withe_spaces to handle newline %N and carriage Return %R
2008-08-29 10:49:24 +00:00
jvelilla
fc7c2d151f Change in the loop, to generate the correct answer (feature visit_json_object). 2008-08-29 10:45:04 +00:00
jvelilla
4e6935655f Add cluster visitor. 2008-08-29 10:40:12 +00:00
berend
d940da7b13 SmartEiffel doesn't have is_space. 2008-08-27 04:29:42 +00:00
berend
31619fc88e JSON number is a double precision IEEE number, not a single precision. 2008-08-27 04:29:12 +00:00
berend
bf781a9d25 Changed formatting a bit.
Made it compile with SE 1.2r7
2008-08-27 04:26:44 +00:00
jvelilla
31750efb8e Add accept method (JSON_VISITOR), remove is_xxx queries, remove to_json feature.
Improve comments
2008-08-25 01:13:35 +00:00
jvelilla
f83c5d2643 Add Visitor Pattern , JSON_VISITOR and PRINT_JSON_VISITOR 2008-08-25 01:10:42 +00:00
jvelilla
c59bc37a40 Fix Bug in quey 'is_a_valid_number'
Remove the space after :  in the regular expression "-?(?: 0|[1-9]\d*)(?: \.\d+)?(?: [eE][+-]?\d+)?\b"
2008-08-08 11:17:32 +00:00
jvelilla
b674dbddf7 Add precondition in query i_th
Remove infix "@" which is deprecated now.
Add invariant for values to show that it is always not Void.
Add postcondition of add.
2008-08-08 11:12:27 +00:00
jvelilla
ed5f8a9740 Redefine the version of ANY of is_equal. 2008-08-08 11:08:51 +00:00
jvelilla
2c42c0dd1a Change void to Void.
Add invariant for 'object' , object_no_null /= Void
2008-08-08 11:04:33 +00:00
jvelilla
d64e01641b Reformatted code to Eiffel Standard 2008-08-08 11:01:14 +00:00
berend
fa35ab07a0 Fixed bug where a JSON string had to end with CRLF. But that's optional.
Reformatted code to Gobo standard.
2008-08-05 03:26:08 +00:00
berend
0bf10c633f Reformatted code to Gobo standard. 2008-08-05 03:25:14 +00:00
paulb
9ef3391b26 Added major version to load the shared library according to rules of ldconfig and the like on other OSs.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@74121 8089f293-4706-0410-a29e-feb5c42a2edf
2008-07-18 20:07:15 +00:00
jvelilla
bc1e6653ae Add Regular expression to check valid numbers and valid unicodes.
Add errors to the parser, under development
2008-07-13 03:30:54 +00:00
jvelilla
b9ccf20d53 Add explicit control characters. 2008-07-13 03:19:20 +00:00
jvelilla
3e7f107b36 Update json.ecf,
Dependencies on Gobo Library. (Regular Expressions)
2008-07-13 03:17:37 +00:00
jvelilla
aa8c2d0a95 Update parse_number 2008-07-09 02:40:38 +00:00
jvelilla
65cd9e8780 Add new files to test ejson, based on json t test material http://www.json.org/JSON_checker/test.zip 2008-06-09 02:24:33 +00:00
jvelilla
cb595d27f4 Update JSON_OBJECT, put routine, now follows Eiffel Style based on HAST_TABLE 2008-06-09 02:18:34 +00:00
jvelilla
aaa10d178a Update Parser with is_parsed.
Update parse_string
2008-06-09 01:32:28 +00:00
jvelilla
1052c10b8d Update test 2008-05-25 18:29:54 +00:00
jvelilla
3083f378a6 Update test 2008-05-25 18:28:40 +00:00
jvelilla
8357bf5d72 Update JSON_VALUE and JSON_OBJECT interface 2008-05-25 18:23:25 +00:00
jvelilla
8f3c7beba8 CDD classes 2008-05-25 00:03:46 +00:00
jvelilla
5a779fbb57 Add new test_json_object 2008-05-25 00:02:56 +00:00
jvelilla
4559b7fef5 Add new test_json_object 2008-05-25 00:00:43 +00:00
jvelilla
7dc33a52f6 Update JSON_STRING rutine is_equal
Update JSON_OBJECT new features (has_keys, item,get_keys), and fixed an incorrect use of HASH_TABLE
2008-05-24 23:57:04 +00:00
jvelilla
de347f6c98 eJson tests initial import 2008-05-24 15:04:36 +00:00
jvelilla
308fa7f2e7 eJson initial import 2008-05-24 14:23:27 +00:00
larryl
a06fbd5f0b Use precondition instead of raising an exception.
Fixed bug#14062: CURL dynamic library not found exception is causing an internal failure in WEL

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@72612 8089f293-4706-0410-a29e-feb5c42a2edf
2008-03-05 11:06:41 +00:00
larryl
098032e815 Raise an exception when cURL dynamic library not found.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@72546 8089f293-4706-0410-a29e-feb5c42a2edf
2008-02-29 03:43:43 +00:00
paulb
893fce5706 Reverted to is_mac
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@72174 8089f293-4706-0410-a29e-feb5c42a2edf
2008-02-01 16:42:36 +00:00
paulb
839cb26d7e changed platform query is_mac' to is_mac_os'
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@72173 8089f293-4706-0410-a29e-feb5c42a2edf
2008-02-01 16:36:55 +00:00
paulb
b1952a6e2c Added query for Mac OS as a platform in PLATFORM.
Fixed cURL library to ustilize Mac OS dylib version of libcurl


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@72154 8089f293-4706-0410-a29e-feb5c42a2edf
2008-01-31 21:02:28 +00:00
jfiat
3b231019ea Added {CURL_OPT_CONSTANTS}.curlopt_followlocation
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71900 8089f293-4706-0410-a29e-feb5c42a2edf
2008-01-14 11:50:55 +00:00
larryl
60b99e48d4 Added `global_cleanup' which declared as curl_global_cleanup() in C.
Added comments.

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71817 8089f293-4706-0410-a29e-feb5c42a2edf
2008-01-09 06:50:07 +00:00
larryl
987c18198e Added http header related features. It means we can change http header by setting a list ourself.
Wrapped more cURL constants.

Added `release_item' in {CURL_FORM} which is useful to clean the {CURL_FORM} generated by {CURL_EXTERNALS}.formadd_string_string.

git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71685 8089f293-4706-0410-a29e-feb5c42a2edf
2007-12-31 09:48:53 +00:00
manus
5980a724cc Removed directory integrated by mistake.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71441 8089f293-4706-0410-a29e-feb5c42a2edf
2007-12-10 17:21:34 +00:00
jfiat
7448567c53 Fully automated EiffelStudio's building using geant scripts:
It integrates part of the work done by "es-make" project from ETH (mainly on the checker script)
  This is a first step in rewriting the previous $EIFFEL_SRC/scripts/*.eant scripts to build 'ec' and make a new delivery.

Added a few standalone geant scripts in the EiffelStudio's source code, to ease the compilation.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71410 8089f293-4706-0410-a29e-feb5c42a2edf
2007-12-07 12:15:52 +00:00
manus
ea4be7219b Fixed bug#13627 where we had an incorrect cast.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71400 8089f293-4706-0410-a29e-feb5c42a2edf
2007-12-07 01:15:55 +00:00
manus
9a3e12fe12 Ensured that the library also works in finalized mode. The issue is that in finalized mode
more than one copy of `eiffel_curl.h' could be present, meaning that multiple values of
  each static declared variables could be present at run-time and in one case, one was properly
  initialized, but not the other. Fixes bug#13671.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71399 8089f293-4706-0410-a29e-feb5c42a2edf
2007-12-07 01:08:12 +00:00
manus
c8c23ca064 Fixed various errors in the C interface.
Use new C external syntax.


git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71204 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-18 05:32:48 +00:00
paulb
4daf5b727a Set item to default_pointer on dispose, to prevent a panic.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71170 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-16 00:13:35 +00:00
larryl
fe76c9eac5 Added `static' to each variable and function to fix Linux Eiffel Studio finalizing C multiply definition problem.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71101 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-09 10:19:23 +00:00
larryl
81d91930ef Added class description and license information.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71100 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-09 08:36:46 +00:00
larryl
7e024b589a Use EIF_REFERENCE instead of EIF_OBJECT.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71086 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-08 08:55:00 +00:00
larryl
65559b8b82 Removed some preprocessors. Made it compiled on Solaris.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71083 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-08 07:52:34 +00:00
larryl
179ac3a128 Improved cURL wrapper library. We can write functions from curl_easy_setopt in pure Eiffel now. Before we have to implement the functions in C.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71081 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-08 07:09:16 +00:00
larryl
6179b0f223 Added constant: curlopt_writefunction
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71028 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-03 06:09:00 +00:00
larryl
77c028a9cd Cosmetics.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@71027 8089f293-4706-0410-a29e-feb5c42a2edf
2007-11-03 06:08:03 +00:00
larryl
09a1c2d34a Made cURL wrapper library works on Linux.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@70943 8089f293-4706-0410-a29e-feb5c42a2edf
2007-10-30 11:22:26 +00:00
larryl
2d99813b5d Removed `libcurl_imp.lib' external object since we use dynamic loading technique now.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@70914 8089f293-4706-0410-a29e-feb5c42a2edf
2007-10-26 13:10:12 +00:00
larryl
6cf3589a43 We can start our executables even without dll (so) files.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@70908 8089f293-4706-0410-a29e-feb5c42a2edf
2007-10-26 08:05:22 +00:00
larryl
1b972b3e24 Removed the lib file which should be generated from C source codes.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@70783 8089f293-4706-0410-a29e-feb5c42a2edf
2007-10-22 10:16:49 +00:00
larryl
a99db5fd43 First commit of libcURL Eiffel wrapper library.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@70782 8089f293-4706-0410-a29e-feb5c42a2edf
2007-10-22 08:22:30 +00:00
774 changed files with 30764 additions and 5803 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
EIFGENs
tests/temp/
.svn/
*.swp

12
.gitmodules vendored
View File

@@ -1,12 +0,0 @@
[submodule "doc/wiki"]
path = doc/wiki
url = https://github.com/Eiffel-World/Eiffel-Web-Framework.wiki.git
[submodule "contrib/library/server/nino"]
path = contrib/library/server/nino
url = https://github.com/Eiffel-World/EiffelWebNino.git
[submodule "contrib/library/text/parser/json"]
path = contrib/library/text/parser/json
url = https://github.com/Eiffel-World/ejson-svn.git
[submodule "contrib/ise_library/cURL"]
path = contrib/ise_library/cURL
url = https://github.com/EiffelSoftware/mirror-Eiffel-cURL.git

316
ChangeLog
View File

@@ -1,3 +1,315 @@
2012-05-14 Jocelyn Fiat
Rather use (READABLE_)STRING_GENERAL for argument instead of _8 or _32
variant Better design to set the WSF_REQUEST.path_parameters especially
handle the case where the request goes trought more than one route (could be
the case when using WSF_ROUTING_HANDLER)
Updated URI Template to follow official RFC6570
2012-05-07 Jocelyn Fiat
Reviewed WSF_REQUEST.item (..) and items to look into Form, Query, and Path
(cookie are excluded for security) Added WSF_REQUEST.path_parameter (a_name):
detachable WSF_VALUE - fill path_parameters using
`import_raw_path_parameters" when executing the route - reset to previous
value with reset_path_parameters (..), just in case the request is executed
via severals routes.
2012-05-04 Jocelyn Fiat
Reverted back to export upload_data and upload_filename to ANY (and related
features)
Removed HTTP_CLIENT_SESSION.post_multipart .. because it was not doing what
the name might evoque Restrict export of
HTTP_CLIENT_REQUEST_CONTEXT.upload_data and upload_filename (and related) to
.._SESSION and .._REQUEST this is mainly internal data, and is more about
implementation than interface
Now the http_client will send the form parameters urlencoded if this is
possible (instead of multipart form data) Note for now, the library does not
support sending file and form parameters at the same time.
2012-05-03 Jocelyn Fiat
Fixed typo in .ecf .. curl instead of cURL
Added geant scripts to compile EWF
Improved the libcurl implementation of http_client by adding
HTTP_CLIENT_SESSION.is_debug: BOOLEAN if True, this display verbose debug
information in console Implemented uploading of file for PUT and POST
requests Refactored LIBCURL_HTTP_CLIENT_REQUEST to free used pointer, and
also ease extension of the class if needed. Updated cURL library with
addition of {CURL_EXTERNALS}.slist_free_all (..)
2012-05-02 Jocelyn Fiat
do not use implicit conversion from HTTP_CONTENT_TYPE
Fixed wrong signature should be READABLE_STRING_32 instead of _8
Also removing the implicit conversion from STRING to HTTP_*_TYPE
Removed implicit conversion from HTTP_CONTENT_TYPE to STRING_8 because it
could be a source of bug due to hidden conversion (and parameters) Applied
changes to autotest cases Cosmetic
2012-04-30 Jocelyn Fiat
Added comments Added `url' to compute the url from base_url, path and query
parameters
Fixed error in URL encoding, according to the RFC3986, space should not be
encoded with '+' but with percent encoding.
Fixed signature issue, the argument `name' should be READABLE_STRING_32
Code cleaning
Added specific helper function related to `charset' parameter
2012-04-27 Jocelyn Fiat
added postcondition status_reason_phrase_unset to `set_status'
cosmetic
2012-04-13 Jocelyn Fiat
Fixed a last minute regression due to removal REQUEST.chunked_input
Added WSF_ROUTER.pre_route_execution_actions: ACTION_SEQUENCE [like route]
This way, one can add logger hook to router, to see which "route" was taken
by the request.
Made WGI_CHUNKED_INPUT_STREAM inherits from WGI_INPUT_STREAM Merged
REQUEST.input and REQUEST.chunked_input Now REQUEST.input handles directly
the chunked transfer encoding, or the non chunked. Kept
REQUEST.is_chunked_input since it matters that Content-Length is 0 even if
there are input (chunked) data.
2012-04-12 Jocelyn Fiat
Fixed compilation of samples
Fixed compilation
Now WGI_RESPONSE.set_status_code (..) has a new argument to pass optional
custom reason phrase. This is a minor breaking change (but prior to the first
release, so acceptable) And then it is now possible to precise a custom
reason phrase (useful for 4xx and 5xx response) At the WSF_RESPONSE level,
the status code is now sent only when the header are sent. thus, it is
possible to change the status code as long as no header is sent. (in the
future, we should also try to delay the sending of headers) Removed
WGI_RESPONSE.put_header_lines (..) which was not used, and WGI is not meant
to provide such user friendly features Now this is available directly on
WSF_RESPONSE
2012-04-06 Jocelyn Fiat
updated to EiffelWebFramework/EWF
sync with json lib.
Sync with wiki
Use https://github.com/EiffelWebFramework/EWF.git as master
2012-04-05 Jocelyn Fiat
Added `transfered_content_length' to WSF_RESPONSE to provide the information
to application This can be used to build logs for instance.
Relaxed WSF_REDIRECTION_RESPONSE.set_content (.., ..) to allow Void for
content type in order to use the one set in header or the default one.
Removed default handler for WSF_ROUTER Added WSF_ROUTE to replace a TUPLE
[H, C] WSF_ROUTER.route (req): detachable WSF_ROUTE WSF_ROUTER.execute_route
(a_route, req, res) To help usage of Routers Remove WSF_HANDLER_CONTEXT
obsolete features. Added comments
2012-03-27 Olivier Ligot
[REM] Remove unneeded precondition
[IMP] Ignore *.swp files
2012-04-02 Jocelyn Fiat
removed obsolete message.
2012-03-27 Olivier Ligot
[REM] Remove unneeded precondition
[IMP] Ignore *.swp files
2012-03-23 Jocelyn Fiat
Renamed same_media_type as same_simple_type Added comments
updated tests.ecf
Added HTTP_MEDIA_TYPE (maybe it will just replace the HTTP_CONTENT_TYPE
later) renamed .media_type as .simple_type for now allow more than one
parameters
Use media_type as replacement for type_and_subtype_string in
HTTP_CONTENT_TYPE
Added class HTTP_CONTENT_TYPE to help manipulation of Content-Type value Now
WSF_REQUEST return a HTTP_CONTENT_TYPE if available Adapted WSF_MIME_HANDLER
to use this new class Added one manual autotest to test MIME handler
2012-03-21 Jocelyn Fiat
in WSF_RESPONSE, `put_header' now call `put_header_text' Removed unused local
variable
Fixed very bad mistake where no Result was ever set for WSF_REQUEST.item (..)
2012-03-20 Jocelyn Fiat
fixed compilation issue (typo)
Do not try to compile_all in "dev" folder
Reverted a previous change, we should not truncated Content-Type after ; In
the case of multipart/form-data the parameter "boundary=" is essential
Use WSF_DEFAULT_SERVICE for the test echo server
Fixing compilation of specific example using the WGI connector directly
Added WSF_SERVICE.to_wgi_service to ease direct integration with existing WGI
components
Relaxed access to `send_to', now it is exported again to avoid breaking
existing code.
remove unused local variable
WSF_REQUEST.content_type should keep only the relevant part of the content
type and forget about the eventual parameters (charset, name) ... note: it
is possible to query meta_string_variable ("CONTENT_TYPE") to get the
complete Content-Type header
Added HTTP_HEADER.(put|add)_content_type_with_parameters (...)
removed obsolete
Implemented WSF_RESPONSE.put_error (...) and related Added
WSF_RESPONSE.put_character Renamed WGI_OUTPUT_STREAM.put_character_8 as
put_character to follow style of put_string (and not put_string_8)
Refactored the WSF_DEFAULT_SERVICE_LAUNCHER Added WSF_DEFAULT_SERVICE to be
more user friendly Splitted the wsf/default/ libraries to have
wsf/connector/... and being able to handle more than one connector in the
same application
Moved mime handler classes under wsf/src/mime/
2012-03-19 Jocelyn Fiat
removed unwanted rescue clause
Updating EWSGI specification classes
Removed WGI_RESPONSE.write (..) Replaced any internal call to
WGI_RESPONSE.write () by the associated implementation (i.e
output.put_string (...) ) Added WGI_OUTPUT_STREAM.put_crlf Renamed
WSF_RESPONSE.put_response (a_message) as `send (a_message)'
WSF_RESPONSE_MESSAGE.send_to (res) is now exported only to WSF_RESPONSE
2012-03-19 Berend de Boer
Avoid another indirection.
status must be set, else WGI_SERVICE.execute will report the postcondition
violation. Conflicts: library/server/wsf/router/wsf_handler.e
Minor code cleanup/typo fix.
2012-03-17 Berend de Boer
Move wgi_service spec to its own directory else I get a class conflicts with
compile_ise.ecf generated by gexace.
2012-03-19 Jocelyn Fiat
Improved comment in WSF_RESPONSE.put_response (..) Added
WSF_REDIRECTION_RESPONSE class
Added WSF_RESPONSE_HANDLER based on WSF_RESPONSE_MESSAGE The descendant has
to implement the function response (ctx: C; req: WSF_REQUEST):
WSF_RESPONSE_MESSAGE Added related features and class in WSF_ROUTER to be
able to use agent easily.
Refactored WSF_HANDLER_CONTEXT - removed path_parameter - added `item' to
include WSF_REQUEST.item - marked obsolete `parameter' The goal is to remove
confusion, remove URI_TEMPLATE specific `path_parameter' and provide a way to
use ctx.item (..) to also include meta variable, query, form, ... items
Use local variable to speed up access to `input'
2012-03-16 Jocelyn Fiat
Applied wsf_extension creation, and classes moved from wsf to wsf_extension
Created wsf_extension, and moved some classes from wsf to wsf_extension
WSF_HANDLER_HELPER WSF_RESOURCE_HANDLER_HELPER WSF_HANDLER_ROUTES_RECORDER
applied removal of HTTP_HEADER.put_status (..)
Removed HTTP_HEADER.put_status (...) It is not recommended to send the status
code as part of the HTTP Header, so let's remove this ambiguity and do not
encourage EWF user to use it
Major renaming, adopt the WSF_ prefix for all classes under "wsf", and
simplify some class names Removed in WGI_INPUT_STREAM, the assertion
"same_last_string_reference" Copyright updates
2012-03-13 Jocelyn Fiat
Fixed compilation of draft/library/server/request/rest/tests/.. Note the
"rest" library will not be maintained since this is not REST.
precise that library/server/request/router is now part of "wsf" library and
not anymore independant library.
Nino connector: - fixed issue related to `ready_for_reading' now use the
`try_...' variant - for now Nino does not support persistent connection, then
we have to respond with "Connection: close" REQUEST_FILE_SYSTEM_HANDLER: -
added not_found_handler and access_denied_handler, so that the user can
customize related response WSF_REQUEST and WSF_VALUE: - modified how
uploaded file are handled, fixed various issues, and added WSF_UPLOADED_FILE
(it is a WSF_VALUE) WSF_VALUE: - added change_name (a_name: like name) -
added url_encoded_name to other WSF_values WSF_REQUEST: - added `destroy' to
perform end of request cleaning (such as deleting temp uploaded files) -
renamed `raw_post_data_recorded' as `raw_input_data_recorded', and related
feature - do not store the RAW_POST_DATA in meta variable anymore, but in
WSF_REQUEST.raw_input_data is asked Added WSF_HTML_PAGE_RESPONSE to help
user WSF_REPONSE.redirect_... now use "temp_redirect" as default instead of
"moved_permanently" which is specific usage Removed many obsolete features.
2012-02-29 Jocelyn Fiat
use https:// url for git submodules
Added assertions to catch if route mapping does not already exists
2012-02-28 Jocelyn Fiat
Synchronized with nino and json library
2012-02-17 jvelilla
Refactor REQUEST_RESOURCE_HANDLER_HELPER to figure out the transfer encoding:
Chunked. Added a new method to retrieve_data independently if the transfer is
chunked or not. Updated ORDER_HANLDER to use this new feature. Sync with
Jocelyn repo
2012-02-16 Jocelyn Fiat
Minor correction, to avoid returning 200 as status code, when the client can
@@ -61,6 +373,10 @@
fixed http_client tests
2012-02-08 jvelilla
Updated content
2012-02-07 Jocelyn Fiat
Better code to test similar functions but with chunked input

View File

@@ -1,15 +1,20 @@
# Eiffel Web Framework
## Version: v0.1
## Overview
Official project site for Eiffel Web Framework:
* http://eiffel-world.github.com/Eiffel-Web-Framework/
* http://eiffelwebframework.github.com/EWF/
For more information please have a look at the related wiki:
* https://github.com/Eiffel-World/Eiffel-Web-Framework/wiki
* https://github.com/EiffelWebFramework/EWF/wiki
For download, check
* https://github.com/EiffelWebFramework/EWF/downloads
## Requirements
@@ -20,10 +25,10 @@ For more information please have a look at the related wiki:
## How to get the source code?
Using git version >= 1.6.5
* git clone --recursive https://github.com/Eiffel-World/Eiffel-Web-Framework.git
* git clone --recursive https://github.com/EiffelWebFramework/EWF.git
Otherwise, try
* git clone https://github.com/Eiffel-World/Eiffel-Web-Framework.git
* git clone https://github.com/EiffelWebFramework/EWF.git
* cd Eiffel-Web-Framework
* git submodule update --init
* git submodule foreach --recursive git checkout master
@@ -43,7 +48,7 @@ An alternative to the last 2 instructions is to use the script from tools folder
* connectors: various web server connectors for EWSGI
* libfcgi: Wrapper for libfcgi SDK
* __wsf__: Web Server Framework [read more](library/server/wsf)
* __router__: URL dispatching/routing based on uri, uri_template, or custom [read more](library/server/wsf/router)
* include URL dispatching/routing based on uri, uri_template, or custom [read more](library/server/wsf/router)
### protocol
* __http__: HTTP related classes, constants for status code, content types, ... [read more](library/protocol/http)
@@ -56,16 +61,15 @@ An alternative to the last 2 instructions is to use the script from tools folder
### text
* __encoder__: Various simpler encoders: base64, url-encoder, xml entities, html entities [read more](library/text/encoder)
### crypto
* eel
* eapml
### Others
* error: very simple/basic library to handle error
## External libraries under 'contrib'
* [Eiffel Web Nino](contrib/library/server/nino)
* ..
* contrib/ise_library/cURL
* contrib/ise_library/math/eapml
* contrib/ise_library/text/encryption/eel
* contrib/library/text/parser/json
## Draft folder = call for contribution ##
### library/server/request ###
@@ -77,4 +81,4 @@ An alternative to the last 2 instructions is to use the script from tools folder
For more information please have a look at the related wiki:
* https://github.com/Eiffel-World/Eiffel-Web-Framework/wiki
* https://github.com/EiffelWebFramework/EWF/wiki

1
VERSION.txt Normal file
View File

@@ -0,0 +1 @@
Version v0.1

35
build.eant Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<project name="build_library" default="help">
<description>
description: "Compile Eiffel Web Framework"
</description>
<target name="help">
<echo message="usage:"/>
<echo message=" geant compile"/>
<echo message=" geant clean"/>
<echo message=" geant clobber"/>
</target>
<target name="compile" >
<echo message="- Compile EWF" />
<geant target="_build_tpl_" arguments="compile" />
</target>
<target name="clean" >
<echo message="- Clean EWF" />
<geant target="_build_tpl_" arguments="clean" />
</target>
<target name="clobber" >
<echo message="- Clobber EWF" />
<geant target="_build_tpl_" arguments="clobber" />
</target>
<target name="_build_tpl_" >
<argument name="_target_name" />
<geant target="${_target_name}" dir="contrib" file="build.eant" reuse_variables="true" />
</target>
</project>

35
contrib/build.eant Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<project name="build_library" default="help">
<description>
description: "Compile Eiffel Web Framework / Contrib"
</description>
<target name="help">
<echo message="usage:"/>
<echo message=" geant compile"/>
<echo message=" geant clean"/>
<echo message=" geant clobber"/>
</target>
<target name="compile" >
<echo message="- Compile contrib" />
<geant target="_build_tpl_" arguments="compile" />
</target>
<target name="clean" >
<echo message="- Clean contrib" />
<geant target="_build_tpl_" arguments="clean" />
</target>
<target name="clobber" >
<echo message="- Clobber contrib" />
<geant target="_build_tpl_" arguments="clobber" />
</target>
<target name="_build_tpl_" >
<argument name="_target_name" />
<geant target="${_target_name}" dir="ise_library" file="build.eant" reuse_variables="true" />
</target>
</project>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<project name="build_library" default="help">
<description>
description: "Compile Eiffel Web Framework / Contrib / ISE library"
</description>
<target name="help">
<echo message="usage:"/>
<echo message=" geant compile"/>
<echo message=" geant clean"/>
<echo message=" geant clobber"/>
</target>
<target name="compile" >
<echo message="- Compile ise_library" />
<geant target="_build_tpl_" arguments="compile" />
</target>
<target name="clean" >
<echo message="- Clean ise_library" />
<geant target="_build_tpl_" arguments="clean" />
</target>
<target name="clobber" >
<echo message="- Clobber ise_library" />
<geant target="_build_tpl_" arguments="clobber" />
</target>
<target name="_build_tpl_" >
<argument name="_target_name" />
<geant target="${_target_name}" dir="cURL" file="build.eant" reuse_variables="true" />
</target>
</project>

View File

@@ -13,43 +13,43 @@
<option warning="true" full_class_checking="true" cat_call_detection="false" is_attached_by_default="true" void_safety="all" namespace="EiffelSoftware.Library">
</option>
<setting name="dotnet_naming_convention" value="true"/>
<external_include location="$(ECF_CONFIG_PATH)\curl\spec\include">
<external_include location="$(ECF_CONFIG_PATH)\cURL\spec\include">
<condition>
<platform value="windows"/>
</condition>
</external_include>
<external_include location="$(ECF_CONFIG_PATH)/curl/spec/include">
<external_include location="$(ECF_CONFIG_PATH)/cURL/spec/include">
<condition>
<platform excluded_value="windows"/>
</condition>
</external_include>
<external_object location="$(ECF_CONFIG_PATH)/curl/spec/$(ISE_PLATFORM)/lib/eiffel_curl.o">
<external_object location="$(ECF_CONFIG_PATH)/cURL/spec/$(ISE_PLATFORM)/lib/eiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="false"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH)/curl/spec/$(ISE_PLATFORM)/lib/MTeiffel_curl.o">
<external_object location="$(ECF_CONFIG_PATH)/cURL/spec/$(ISE_PLATFORM)/lib/MTeiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="true"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH)\curl\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\eiffel_curl.lib">
<external_object location="$(ECF_CONFIG_PATH)\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\eiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="false"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH)\curl\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\mteiffel_curl.lib">
<external_object location="$(ECF_CONFIG_PATH)\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\mteiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="true"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH)\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\ileiffel_curl.lib">
<external_object location="$(ECF_CONFIG_PATH)\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\ileiffel_curl.lib">
<condition>
<platform value="windows"/>
<dotnet value="true"/>
@@ -57,7 +57,7 @@
</external_object>
<library name="api_wrapper" location="$ISE_LIBRARY\library\api_wrapper\api_wrapper-safe.ecf"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<cluster name="curl" location=".\" recursive="true">
<cluster name="curl" location=".\cURL" recursive="true">
<file_rule>
<exclude>/spec$</exclude>
<exclude>/Clib$</exclude>

View File

@@ -13,43 +13,43 @@
<option warning="true" namespace="EiffelSoftware.Library">
</option>
<setting name="dotnet_naming_convention" value="true"/>
<external_include location="$(ECF_CONFIG_PATH}\curl\spec\include">
<external_include location="$(ECF_CONFIG_PATH)\cURL\spec\include">
<condition>
<platform value="windows"/>
</condition>
</external_include>
<external_include location="$(ECF_CONFIG_PATH}/curl/spec/include">
<external_include location="$(ECF_CONFIG_PATH)/cURL/spec/include">
<condition>
<platform excluded_value="windows"/>
</condition>
</external_include>
<external_object location="$(ECF_CONFIG_PATH}/curl/spec/$(ISE_PLATFORM)/lib/eiffel_curl.o">
<external_object location="$(ECF_CONFIG_PATH)/cURL/spec/$(ISE_PLATFORM)/lib/eiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="false"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH}/curl/spec/$(ISE_PLATFORM)/lib/MTeiffel_curl.o">
<external_object location="$(ECF_CONFIG_PATH)/cURL/spec/$(ISE_PLATFORM)/lib/MTeiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="true"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH}\curl\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\eiffel_curl.lib">
<external_object location="$(ECF_CONFIG_PATH)\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\eiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="false"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH}\curl\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\mteiffel_curl.lib">
<external_object location="$(ECF_CONFIG_PATH)\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\mteiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="true"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ECF_CONFIG_PATH}\curl\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\ileiffel_curl.lib">
<external_object location="$(ECF_CONFIG_PATH)\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\ileiffel_curl.lib">
<condition>
<platform value="windows"/>
<dotnet value="true"/>
@@ -57,7 +57,7 @@
</external_object>
<library name="api_wrapper" location="$ISE_LIBRARY\library\api_wrapper\api_wrapper.ecf"/>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<cluster name="curl" location=".\" recursive="true">
<cluster name="curl" location=".\cURL" recursive="true">
<file_rule>
<exclude>/spec$</exclude>
<exclude>/Clib$</exclude>

View File

@@ -0,0 +1,58 @@
TOP = ..
DIR = $dir_sep
OUTDIR= .
INDIR= .
CC = $cc
OUTPUT_CMD = $output_cmd
CFLAGS = -I"$rt_include" -I..$(DIR)spec$(DIR)include -I. \
-I..$(DIR)..$(DIR)..$(DIR)C_library$(DIR)libpng -I..$(DIR)..$(DIR)..$(DIR)C_library$(DIR)zlib
JCFLAGS = $(CFLAGS) $ccflags $optimize
JMTCFLAGS = $(CFLAGS) $mtccflags $optimize
JILCFLAGS = $(CFLAGS) $mtccflags $optimize -DEIF_IL_DLL
LN = copy
MV = $mv
RM = $del
MAKE = $make
MKDIR = $mkdir
LINK = $link32
DLL_FLAGS = $dll_flags
DLL_LIBS = $dll_libs
OBJECTS = eiffel_curl.$obj
MT_OBJECTS = MTeiffel_curl.$obj
IL_OBJECTS = ILeiffel_curl.$obj
.c.$obj:
$(CC) -c $(JCFLAGS) $<
all:: $output_libraries
$(MAKE) clean
standard:: eiffel_curl.lib ileiffel_curl.lib
mtstandard:: mteiffel_curl.lib
clean:
$(RM) *.$obj
$(RM) *.lib
eiffel_curl.lib: $(OBJECTS)
$alib_line
$(MKDIR) ..$(DIR)spec$(DIR)$(ISE_C_COMPILER)$(DIR)$(ISE_PLATFORM)$(DIR)lib
$(MV) $@ ..$(DIR)spec$(DIR)$(ISE_C_COMPILER)$(DIR)$(ISE_PLATFORM)$(DIR)lib$(DIR)$@
mteiffel_curl.lib: $(MT_OBJECTS)
$alib_line
$(MKDIR) ..$(DIR)spec$(DIR)$(ISE_C_COMPILER)$(DIR)$(ISE_PLATFORM)$(DIR)lib
$(MV) $@ ..$(DIR)spec$(DIR)$(ISE_C_COMPILER)$(DIR)$(ISE_PLATFORM)$(DIR)lib$(DIR)$@
ileiffel_curl.lib: $(IL_OBJECTS)
$alib_line
$(MKDIR) ..$(DIR)spec$(DIR)$(ISE_C_COMPILER)$(DIR)$(ISE_PLATFORM)$(DIR)lib
$(MV) $@ ..$(DIR)spec$(DIR)$(ISE_C_COMPILER)$(DIR)$(ISE_PLATFORM)$(DIR)lib$(DIR)$@
#Multithreaded targets.
MTeiffel_curl.$obj: eiffel_curl.c
$(CC) $(JMTCFLAGS) $(OUTPUT_CMD)$@ -c $?
#.NET targets.
ILeiffel_curl.$obj: eiffel_curl.c
$(CC) $(JILCFLAGS) $(OUTPUT_CMD)$@ -c $?

View File

@@ -0,0 +1,92 @@
case $CONFIG in
'')
if test ! -f config.sh; then
(echo "Can't find config.sh."; exit 1)
fi 2>/dev/null
. ./config.sh
;;
esac
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
echo "Extracting "."/Makefile (with variable substitutions)"
$spitshell >Makefile <<!GROK!THIS!
########################################################################
# Makefile generated from Makefile.SH on $DATE
SHELL = /bin/sh
AR = ar rc
CC = $cc
CTAGS = ctags
INCLUDE = -I$rt_include -I../spec/include -I../../../C_library/libpng -I../../../C_library/zlib
CFLAGS = $optimize $ccflags $large -g \$(INCLUDE)
MTCFLAGS = $optimize $mtccflags $large -g \$(INCLUDE)
SHAREDLINK = $sharedlink
LDSHAREDFLAGS = $ldsharedflags
LN = $ln
MAKE = $make
MKDEP = $mkdep \$(DPFLAGS) --
RANLIB = $ranlib
RM = $rm -f
MV = $mv
MKDIR = $mkdir -p
PLATFORM = $ISE_PLATFORM
########################################################################
# New suffixes and associated building rules -- edit with care
!GROK!THIS!
$spitshell >>Makefile <<'!NO!SUBS!'
MT_OBJECTS = MTeiffel_curl.o
OBJECTS = eiffel_curl.o
ALL_OBJECTS = $(OBJECTS) $(MT_OBJECTS)
all: $(ALL_OBJECTS)
$(MKDIR) ../spec/$(PLATFORM)/lib
$(MV) $? ../spec/$(PLATFORM)/lib
$(MAKE) clobber
MTeiffel_curl.o: eiffel_curl.c
$(CC) -c $(MTCFLAGS) $? -o $@
########################################################################
# Common rules for all Makefiles -- do not edit
emptyrule::
clean: local_clean
realclean: local_realclean
clobber: local_clobber
local_clean::
$(RM) core *~ *.o *.so *.a
local_realclean:: local_clean
local_clobber:: local_realclean
$(RM) Makefile config.sh
Makefile: Makefile.SH
/bin/sh Makefile.SH
tags::
$(CTAGS) -w *.[ch]
$(CTAGS) -xw *.[ch] > tags
local_clobber::
$(RM) tags
########################################################################
# Dependencies generated by make depend
# DO NOT DELETE THIS LINE -- make depend relies on it
# Put nothing here or make depend will gobble it up
.FORCE_DEPEND::
@echo "You must run 'make depend' in $(TOP) first."; exit 1
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile

View File

@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<project name="build_curl_clib" default="help">
<description>
description: "cURL Clib library compilation"
</description>
<target name="help">
<echo message="usage:"/>
<echo message=" geant compile"/>
<echo message=" geant clean"/>
<echo message=" geant clobber"/>
</target>
<target name="compile" >
<exec executable="finish_freezing -library" />
</target>
<target name="clean" >
</target>
<target name="clobber" depend="clean" />
</project>

View File

@@ -0,0 +1,188 @@
/*
indexing
description: "Functions used by the class CURL_FUNCTION."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
*/
#include "eiffel_curl.h"
typedef EIF_INTEGER (* EIF_CURL_PROGRESS_PROC) (
#ifndef EIF_IL_DLL
EIF_REFERENCE, /* CURL_FUNCTION Eiffel object */
#endif
EIF_POINTER, /* a_user_pointer */
EIF_REAL_64, /* a_dltotal */
EIF_REAL_64, /* a_dlnow */
EIF_REAL_64, /* a_ultotal */
EIF_REAL_64 /* a_ulnow */
);
typedef EIF_INTEGER (* EIF_CURL_WRITE_PROC) (
#ifndef EIF_IL_DLL
EIF_REFERENCE, /* CURL_FUNCTION Eiffel object */
#endif
EIF_POINTER, /* a_data_pointer */
EIF_INTEGER, /* a_size */
EIF_INTEGER, /* a_nmemb */
EIF_POINTER /* a_write_pointer */
);
typedef EIF_INTEGER (* EIF_CURL_READ_PROC) (
#ifndef EIF_IL_DLL
EIF_REFERENCE, /* CURL_FUNCTION Eiffel object */
#endif
EIF_POINTER, /* a_data_pointer */
EIF_INTEGER, /* a_size */
EIF_INTEGER, /* a_nmemb */
EIF_POINTER /* a_write_pointer */
);
typedef EIF_INTEGER (* EIF_CURL_DEBUG_PROC) (
#ifndef EIF_IL_DLL
EIF_REFERENCE, /* CURL_FUNCTION Eiffel object */
#endif
EIF_POINTER, /* a_curl_handle */
EIF_INTEGER, /* a_curl_infotype */
EIF_POINTER, /* a_char_pointer */
EIF_INTEGER, /* a_size */
EIF_POINTER /* a_user_pointer */
);
static EIF_OBJECT eiffel_function_object = NULL;
/* Address of Eiffel object CURL_FUNCTION */
static EIF_CURL_PROGRESS_PROC eiffel_progress_function = NULL;
/* Address of Eiffel CURL_FUNCTION.progress_function */
static EIF_CURL_WRITE_PROC eiffel_write_function = NULL;
/* Address of Eiffel CURL_FUNCTION.write_function */
static EIF_CURL_READ_PROC eiffel_read_function = NULL;
/* Address of Eiffel CURL_FUNCTION.read_function */
static EIF_CURL_DEBUG_PROC eiffel_debug_function = NULL;
/* Address of Eiffel CURL_FUNCTION.debug_function */
/* Set Eiffel CURL_FUNCTION object address */
void c_set_object(EIF_REFERENCE a_address)
{
if (a_address) {
eiffel_function_object = eif_protect (a_address);
} else {
eiffel_function_object = NULL;
}
}
/* Release Eiffel CURL_FUNCTION object address */
void c_release_object()
{
eif_wean (eiffel_function_object);
}
/* Set CURL_FUNCTOIN.progress_function address */
void c_set_progress_function_address( EIF_POINTER a_address)
{
eiffel_progress_function = (EIF_CURL_PROGRESS_PROC) a_address;
}
/* Set CURL_FUNCTOIN.write_function address */
void c_set_write_function_address( EIF_POINTER a_address)
{
eiffel_write_function = (EIF_CURL_WRITE_PROC) a_address;
}
/* Set CURL_FUNCTOIN.read_function address */
void c_set_read_function_address( EIF_POINTER a_address)
{
eiffel_read_function = (EIF_CURL_READ_PROC) a_address;
}
/* Set CURL_FUNCTOIN.debug_function address */
void c_set_debug_function_address (EIF_POINTER a_address)
{
eiffel_debug_function = (EIF_CURL_DEBUG_PROC) a_address;
}
/* Eiffel adapter function for CURLOPT_WRITEFUNCTION
We need this function since Eiffel function call need first parameter is EIF_REFERENCE. */
size_t curl_write_function (void *ptr, size_t size, size_t nmemb, void *data)
{
if (eiffel_function_object) {
return (size_t) ((eiffel_write_function) (
#ifndef EIF_IL_DLL
(EIF_REFERENCE) eif_access (eiffel_function_object),
#endif
(EIF_POINTER) ptr,
(EIF_INTEGER) size,
(EIF_INTEGER) nmemb,
(EIF_POINTER) data));
} else {
return 0;
}
}
/* Eiffel adapter function for CURLOPT_READFUNCTION
We need this function since Eiffel function call need first parameter is EIF_REFERENCE. */
size_t curl_read_function (void *ptr, size_t size, size_t nmemb, void *data)
{
if (eiffel_function_object) {
return (size_t) ((eiffel_read_function) (
#ifndef EIF_IL_DLL
(EIF_REFERENCE) eif_access (eiffel_function_object),
#endif
(EIF_POINTER) ptr,
(EIF_INTEGER) size,
(EIF_INTEGER) nmemb,
(EIF_POINTER) data));
} else {
return 0;
}
}
/* Eiffel adapter function for CURLOPT_PROGRESSFUNCTION
We need this function since Eiffel function call need first parameter is EIF_REFERENCE. */
size_t curl_progress_function (void * a_object_id, double a_dltotal, double a_dlnow, double a_ultotal, double a_ulnow)
{
if (eiffel_function_object) {
return (size_t) ((eiffel_progress_function) (
#ifndef EIF_IL_DLL
(EIF_REFERENCE) eif_access (eiffel_function_object),
#endif
(EIF_POINTER) a_object_id,
(EIF_REAL_64) a_dltotal,
(EIF_REAL_64) a_dlnow,
(EIF_REAL_64) a_ultotal,
(EIF_REAL_64) a_ulnow));
} else {
return 0;
}
}
/* Eiffel adapter function for CURLOPT_DEBUGFUNCTION
We need this function since Eiffel function call need first parameter is EIF_REFERENCE. */
size_t curl_debug_function (CURL * a_curl_handle, curl_infotype a_curl_infotype, unsigned char * a_char_pointer, size_t a_size, void * a_object_id)
{
if (eiffel_function_object) {
return (size_t) ((eiffel_debug_function) (
#ifndef EIF_IL_DLL
(EIF_REFERENCE) eif_access (eiffel_function_object),
#endif
(EIF_POINTER) a_curl_handle,
(EIF_INTEGER) a_curl_infotype,
(EIF_POINTER) a_char_pointer,
(EIF_INTEGER) a_size,
(EIF_POINTER) a_object_id));
} else {
return 0;
}
}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<project name="build_curl" default="help">
<description>
description: "cURL library compilation"
</description>
<target name="help">
<echo message="usage:"/>
<echo message=" geant compile"/>
<echo message=" geant clean"/>
<echo message=" geant clobber"/>
</target>
<target name="compile">
<echo message="- Compile [cURL]" />
<geant target="compile" file="build.eant" dir="Clib"
reuse_variables="true" />
</target>
<target name="clean">
<echo message="- Clean [cURL]" />
<delete directory="spec\${ISE_C_COMPILER}\${ISE_PLATFORM}" />
</target>
<target name="clobber" depend="clean" />
</project>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-5-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd" name="curl" uuid="D51EF190-6157-4B47-8E73-FA93DCBB7A71" library_target="curl">
<target name="curl">
<description>cURL: libcURL wrapper library for Eiffel.
Copyright (c) 1984-2006, Eiffel Software and others.
Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt).</description>
<root all_classes="true"/>
<file_rule>
<exclude>/\.svn$</exclude>
<exclude>/EIFGEN.{0,1}$</exclude>
<exclude>/temp$</exclude>
</file_rule>
<option warning="true" full_class_checking="true" cat_call_detection="false" is_attached_by_default="true" void_safety="all" namespace="EiffelSoftware.Library">
</option>
<setting name="dotnet_naming_convention" value="true"/>
<external_include location="$(ISE_LIBRARY)\library\cURL\spec\include">
<condition>
<platform value="windows"/>
</condition>
</external_include>
<external_include location="$(ISE_LIBRARY)/library/cURL/spec/include">
<condition>
<platform excluded_value="windows"/>
</condition>
</external_include>
<external_object location="$(ISE_LIBRARY)/library/cURL/spec/$(ISE_PLATFORM)/lib/eiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="false"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)/library/cURL/spec/$(ISE_PLATFORM)/lib/MTeiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="true"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)\library\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\eiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="false"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)\library\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\mteiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="true"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)\library\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\ileiffel_curl.lib">
<condition>
<platform value="windows"/>
<dotnet value="true"/>
</condition>
</external_object>
<library name="api_wrapper" location="$ISE_LIBRARY\library\api_wrapper\api_wrapper-safe.ecf"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<cluster name="curl" location=".\" recursive="true">
<file_rule>
<exclude>/spec$</exclude>
<exclude>/Clib$</exclude>
</file_rule>
<file_rule>
<exclude>/gtk$</exclude>
<exclude>/mac$</exclude>
<condition>
<platform value="windows"/>
</condition>
</file_rule>
<file_rule>
<exclude>/mswin$</exclude>
<exclude>/gtk$</exclude>
<condition>
<platform value="macintosh"/>
<custom name="vision_implementation" value="cocoa"/>
</condition>
</file_rule>
<file_rule>
<exclude>/mswin$</exclude>
<exclude>/mac$</exclude>
<condition>
<platform excluded_value="windows"/>
<custom name="vision_implementation" excluded_value="cocoa"/>
</condition>
</file_rule>
</cluster>
</target>
<target name="curl_dotnet" extends="curl">
<setting name="msil_generation" value="true"/>
</target>
</system>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-5-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd" name="curl" uuid="D51EF190-6157-4B47-8E73-FA93DCBB7A71" library_target="curl">
<target name="curl">
<description>cURL: libcURL wrapper library for Eiffel.
Copyright (c) 1984-2006, Eiffel Software and others.
Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt).</description>
<root all_classes="true"/>
<file_rule>
<exclude>/\.svn$</exclude>
<exclude>/EIFGEN.{0,1}$</exclude>
<exclude>/temp$</exclude>
</file_rule>
<option warning="true" namespace="EiffelSoftware.Library">
</option>
<setting name="dotnet_naming_convention" value="true"/>
<external_include location="$(ISE_LIBRARY)\library\cURL\spec\include">
<condition>
<platform value="windows"/>
</condition>
</external_include>
<external_include location="$(ISE_LIBRARY)/library/cURL/spec/include">
<condition>
<platform excluded_value="windows"/>
</condition>
</external_include>
<external_object location="$(ISE_LIBRARY)/library/cURL/spec/$(ISE_PLATFORM)/lib/eiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="false"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)/library/cURL/spec/$(ISE_PLATFORM)/lib/MTeiffel_curl.o">
<condition>
<platform excluded_value="windows"/>
<multithreaded value="true"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)\library\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\eiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="false"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)\library\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\mteiffel_curl.lib">
<condition>
<platform value="windows"/>
<multithreaded value="true"/>
<dotnet value="false"/>
</condition>
</external_object>
<external_object location="$(ISE_LIBRARY)\library\cURL\spec\$(ISE_C_COMPILER)\$(ISE_PLATFORM)\lib\ileiffel_curl.lib">
<condition>
<platform value="windows"/>
<dotnet value="true"/>
</condition>
</external_object>
<library name="api_wrapper" location="$ISE_LIBRARY\library\api_wrapper\api_wrapper.ecf"/>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<cluster name="curl" location=".\" recursive="true">
<file_rule>
<exclude>/spec$</exclude>
<exclude>/Clib$</exclude>
</file_rule>
<file_rule>
<exclude>/gtk$</exclude>
<exclude>/mac$</exclude>
<condition>
<platform value="windows"/>
</condition>
</file_rule>
<file_rule>
<exclude>/mswin$</exclude>
<exclude>/gtk$</exclude>
<condition>
<platform value="macintosh"/>
<custom name="vision_implementation" value="cocoa"/>
</condition>
</file_rule>
<file_rule>
<exclude>/mswin$</exclude>
<exclude>/mac$</exclude>
<condition>
<platform excluded_value="windows"/>
<custom name="vision_implementation" excluded_value="cocoa"/>
</condition>
</file_rule>
</cluster>
</target>
<target name="curl_dotnet" extends="curl">
<setting name="msil_generation" value="true"/>
</target>
</system>

View File

@@ -0,0 +1,336 @@
note
description: "[
All possible error codes from all sorts of curl functions.
Future versions may return other values, stay prepared.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_CODES
feature -- Eiffel cURL: Constants
eiffelcurle_error_occurred: INTEGER = -1
-- Error occurred in Eiffel cURL internals
feature -- Constants
curle_ok: INTEGER = 0
-- Declared as CURLE_OK
curle_unsupported_protocol: INTEGER = 1
-- Declared as CURLE_UNSUPPORTED_PROTOCOL
curle_failed_init: INTEGER = 2
-- Declared as CURLE_FAILED_INIT
curle_url_malformat: INTEGER = 3
-- Declared as CURLE_URL_MALFORMAT
curle_obsolete4: INTEGER = 4
-- Declared as CURLE_OBSOLETE4
-- NOT USED
curle_couldnt_resolve_proxy: INTEGER = 5
-- Declared as CURLE_COULDNT_RESOLVE_PROXY
curle_couldnt_resolve_host: INTEGER = 6
-- Declared as CURLE_COULDNT_RESOLVE_HOST
curle_couldnt_connect: INTEGER = 7
-- Declared as CURLE_COULDNT_CONNECT
curle_ftp_weird_server_reply: INTEGER = 8
-- Declared as CURLE_FTP_WEIRD_SERVER_REPLY
curle_remote_access_denied: INTEGER = 9
-- Declared as CURLE_REMOTE_ACCESS_DENIED
-- A service was denied by the server due to lack of access
-- when login fails this is not returned.
curle_obsolete10: INTEGER = 10
-- Declared as CURLE_OBSOLETE10 NOT USED
curle_ftp_weird_pass_reply: INTEGER = 11
-- Declared as CURLE_FTP_WEIRD_PASS_REPLY
curle_obsolete12: INTEGER = 12
-- Declared as CURLE_OBSOLETE12 NOT USED
curle_ftp_weird_pasv_reply: INTEGER = 13
-- Declared as CURLE_FTP_WEIRD_PASV_REPLY
curle_ftp_weird_227_format: INTEGER = 14
-- Declared as CURLE_FTP_WEIRD_227_FORMAT
curle_ftp_cant_get_host: INTEGER = 15
-- Declared as CURLE_FTP_CANT_GET_HOST
curle_obsolete16: INTEGER = 16
-- Declared as CURLE_OBSOLETE16
-- NOT USED
curle_ftp_couldnt_set_type: INTEGER = 17
-- Declared as CURLE_FTP_COULDNT_SET_TYPE
curle_partial_file: INTEGER = 18
-- Declared as CURLE_PARTIAL_FILE
curle_ftp_couldnt_retr_file: INTEGER = 19
-- Declared as CURLE_FTP_COULDNT_RETR_FILE
curle_obsolete20: INTEGER = 20
-- Declared as CURLE_OBSOLETE20
-- NOT USED
curle_quote_error: INTEGER = 21
-- Declared as CURLE_QUOTE_ERROR
-- quote command failure
curle_http_returned_error: INTEGER = 22
-- Declared as CURLE_HTTP_RETURNED_ERROR
curle_write_error: INTEGER = 23
-- Declared as CURLE_WRITE_ERROR
curle_obsolete24: INTEGER = 24
-- Declared as CURLE_OBSOLETE24 NOT USED
curle_upload_failed: INTEGER = 25
-- Declared as CURLE_UPLOAD_FAILED
-- failed upload "command"
curle_read_error: INTEGER = 26
-- Declared as CURLE_READ_ERROR
-- couldn't open/read from file
curle_out_of_memory: INTEGER = 27
-- Declared as CURLE_OUT_OF_MEMORY
-- Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
-- instead of a memory allocation error if CURL_DOES_CONVERSIONS
-- is defined
curle_operation_timedout: INTEGER = 28
-- Declared as CURLE_OPERATION_TIMEDOUT
-- the timeout time was reached
curle_obsolete29: INTEGER = 29
-- Declared as CURLE_OBSOLETE29
-- NOT USED
curle_ftp_port_failed: INTEGER = 30
-- Declared as CURLE_FTP_PORT_FAILED
-- FTP PORT operation failed
curle_ftp_couldnt_use_rest: INTEGER = 31
-- Declared as CURLE_FTP_COULDNT_USE_REST
-- the REST command failed
curle_obsolete32: INTEGER = 32
-- Declared as CURLE_OBSOLETE32
-- NOT USED
curle_range_error: INTEGER = 33
-- Declared as CURLE_RANGE_ERROR
-- RANGE "command" didn't work
curle_http_post_error: INTEGER = 34
-- Declared as CURLE_HTTP_POST_ERROR
curle_ssl_connect_error: INTEGER = 35
-- Declared CURLE_SSL_CONNECT_ERROR
-- wrong when connecting with SSL
curle_bad_download_resume: INTEGER = 36
-- Declared as CURLE_BAD_DOWNLOAD_RESUME
-- couldn't resume download
curle_file_couldnt_read_file: INTEGER = 37
-- Declared as CURLE_FILE_COULDNT_READ_FILE
curle_ldap_cannot_bind: INTEGER = 38
-- Declared as CURLE_LDAP_CANNOT_BIND
curle_ldap_search_failed: INTEGER = 39
-- Declared as CURLE_LDAP_SEARCH_FAILED
curle_obsolete40: INTEGER = 40
-- Declared as CURLE_OBSOLETE40
-- NOT USED
curle_function_not_found: INTEGER = 41
-- Declared as CURLE_FUNCTION_NOT_FOUND
curle_aborted_by_callback: INTEGER = 42
-- Declared as CURLE_ABORTED_BY_CALLBACK
curle_bad_function_argument: INTEGER = 43
-- Declared as CURLE_BAD_FUNCTION_ARGUMENT
curle_obsolete44: INTEGER = 44
-- Declared as CURLE_OBSOLETE44
-- NOT USED
curle_interface_failed: INTEGER = 45
-- Declared as CURLE_INTERFACE_FAILED
-- CURLOPT_INTERFACE failed
curle_obsolete46: INTEGER = 46
-- Declared as CURLE_OBSOLETE46
-- NOT USED
curle_too_many_redirects: INTEGER = 47
-- Declared as CURLE_TOO_MANY_REDIRECTS
-- catch endless re-direct loops
curle_unknown_telnet_option: INTEGER = 48
-- Declared as CURLE_UNKNOWN_TELNET_OPTION
-- User specified an unknown option
curle_telnet_option_syntax: INTEGER = 49
-- Declared as CURLE_TELNET_OPTION_SYNTAX
-- Malformed telnet option
curle_obsolete50: INTEGER = 50
-- Declared as CURLE_OBSOLETE50
-- NOT USED
curle_ssl_peer_certificate: INTEGER = 51
-- Declared as CURLE_SSL_PEER_CERTIFICATE
-- peer's certificate wasn't ok
curle_got_nothing: INTEGER = 52
-- Declared as CURLE_GOT_NOTHING
-- when this is a specific error
curle_ssl_engine_notfound: INTEGER = 53
-- Declared as CURLE_SSL_ENGINE_NOTFOUND
-- SSL crypto engine not found */
curle_ssl_engine_setfailed: INTEGER = 54
-- Declared as CURLE_SSL_ENGINE_SETFAILED
-- can not set SSL crypto engine as default
curle_send_error: INTEGER = 55
-- Declared as CURLE_SEND_ERROR
-- failed sending network data
curle_recv_error: INTEGER = 56
-- Declared as CURLE_RECV_ERROR
-- failure in receiving network data
curle_obsolete57: INTEGER = 57
-- Declared as CURLE_OBSOLETE57
-- NOT IN USE
curle_ssl_certproblem: INTEGER = 58
-- Declared as CURLE_SSL_CERTPROBLEM
-- problem with the local certificate
curle_ssl_cipher: INTEGER = 59
-- Declared as CURLE_SSL_CIPHER
-- couldn't use specified cipher
curle_ssl_cacert: INTEGER = 60
-- Declared as CURLE_SSL_CACERT
-- problem with the CA cert (path?)
curle_bad_content_encoding: INTEGER = 61
-- Declared as CURLE_BAD_CONTENT_ENCODING
-- Unrecognized transfer encoding
curle_ldap_invalid_url: INTEGER = 62
-- Declared as CURLE_LDAP_INVALID_URL
-- Invalid LDAP URL
curle_filesize_exceeded: INTEGER = 63
-- Declared as CURLE_FILESIZE_EXCEEDED
-- Maximum file size exceeded
curle_use_ssl_failed: INTEGER = 64
-- Declared as CURLE_USE_SSL_FAILED
-- Requested FTP SSL level failed
curle_send_fail_rewind: INTEGER = 65
-- Declared as CURLE_SEND_FAIL_REWIND
-- Sending the data requires a rewind that failed
curle_ssl_engine_initfailed: INTEGER = 66
-- Declared as CURLE_SSL_ENGINE_INITFAILED
-- failed to initialise ENGINE
curle_login_denied: INTEGER = 67
-- Declared as CURLE_LOGIN_DENIED
-- user, password or similar was not accepted and we failed to login
curle_tftp_notfound: INTEGER = 68
-- Declared as CURLE_TFTP_NOTFOUND
-- file not found on server
curle_tftp_perm: INTEGER = 69
-- Declared as CURLE_TFTP_PERM
-- permission problem on server
curle_remote_disk_full: INTEGER = 70
-- Declared as CURLE_REMOTE_DISK_FULL
-- out of disk space on server
curle_tftp_illegal: INTEGER = 71
-- Declared as CURLE_TFTP_ILLEGAL
-- Illegal TFTP operation
curle_tftp_unknownid: INTEGER = 72
-- Declared as CURLE_TFTP_UNKNOWNID
-- Unknown transfer ID
curle_remote_file_exists: INTEGER = 73
-- Declared as CURLE_REMOTE_FILE_EXISTS
-- File already exists
curle_tftp_nosuchuser: INTEGER = 74
-- Declared as CURLE_TFTP_NOSUCHUSER
-- No such user
curle_conv_failed: INTEGER = 75
-- Declared as CURLE_CONV_FAILED
-- conversion failed
curle_conv_reqd: INTEGER = 76
-- Declared as CURLE_CONV_REQD
-- caller must register conversion callbacks using curl_easy_setopt options
-- CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPT_CONV_TO_NETWORK_FUNCTION, and
-- CURLOPT_CONV_FROM_UTF8_FUNCTION
curle_ssl_cacert_badfile: INTEGER = 77
-- Declared as CURLE_SSL_CACERT_BADFILE
-- could not load CACERT file, missing or wrong format
curle_remote_file_not_found: INTEGER = 78
-- Declared as CURLE_REMOTE_FILE_NOT_FOUND
-- remote file not found
curle_ssh: INTEGER = 79
-- Declared as CURLE_SSH
-- error from the SSH layer, somewhat generic so the error message will be of
-- interest when this has happened
curle_ssl_shutdown_failed: INTEGER = 80;
-- Declared as CURLE_SSL_SHUTDOWN_FAILED
-- Failed to shut down the SSL connection
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,104 @@
note
description: "[
Default implementation of CURL_FUNCTION.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_DEFAULT_FUNCTION
inherit
CURL_FUNCTION
create
make
feature {NONE} -- Initialization
make
-- Creation method
do
set_object_and_function_address
end
feature -- Command
progress_function (a_object_id: POINTER; a_download_total, a_download_now, a_upload_total, a_upload_now: REAL_64): INTEGER
do
end
write_function (a_data_pointer: POINTER; a_size, a_nmemb: INTEGER; a_object_id: POINTER): INTEGER
local
l_c_string: C_STRING
do
-- Returns the number of bytes actually saved into object identified by `a_object_id'
Result := a_size * a_nmemb
create l_c_string.make_shared_from_pointer_and_count (a_data_pointer, Result)
check attached {CURL_STRING} (create {IDENTIFIED}).id_object (a_object_id.to_integer_32) as l_string then
l_string.append (l_c_string.substring (1, Result))
end
end
read_function (a_data_pointer: POINTER; a_size, a_nmemb: INTEGER; a_object_id: POINTER): INTEGER
-- A callback readfunction
do
end
debug_function (a_curl_handle: POINTER; a_curl_infotype: INTEGER; a_char_pointer: POINTER; a_size: INTEGER; a_object_id: POINTER): INTEGER
local
l_c_string: C_STRING
do
inspect
a_curl_infotype
when {CURL_INFO_TYPE}.curlinfo_data_in then
dump ("<= Recv data", a_char_pointer, a_size)
when {CURL_INFO_TYPE}.curlinfo_data_out then
dump ("=> Send data", a_char_pointer, a_size)
when {CURL_INFO_TYPE}.curlinfo_header_in then
dump ("<= Recv header", a_char_pointer, a_size)
when {CURL_INFO_TYPE}.curlinfo_header_out then
dump ("=> Send header", a_char_pointer, a_size)
when {CURL_INFO_TYPE}.curlinfo_ssl_data_in then
dump ("<= Recv SSL data", a_char_pointer, a_size)
when {CURL_INFO_TYPE}.curlinfo_ssl_data_out then
dump ("=> Send SSL data", a_char_pointer, a_size)
when {CURL_INFO_TYPE}.curlinfo_text then
create l_c_string.make_by_pointer_and_count (a_char_pointer, a_size)
print ("%N== Info: " + l_c_string.string)
else
check type_unknow: False end
end
end
feature {NONE} -- Implementation
dump (a_text: STRING; a_char_pointer: POINTER; a_size: INTEGER)
-- Dump debug information
require
not_void: a_text /= Void
exists: a_char_pointer /= default_pointer
non_negative: a_size >= 0
local
l_c_string: C_STRING
do
create l_c_string.make_shared_from_pointer_and_count (a_char_pointer, a_size)
print ("%N" + a_text + "%N" + l_c_string.string)
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,409 @@
note
description: "[
cURL easy externals.
For more informaton see:
http://curl.haxx.se/libcurl/c/
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_EASY_EXTERNALS
feature -- Command
init: POINTER
-- Declared as curl_easy_init().
require
dynamic_library_exists: is_dynamic_library_exists
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_init")
if l_api /= default_pointer then
Result := c_init (l_api)
end
ensure
exists: Result /= default_pointer
end
setopt_string (a_curl_handle: POINTER; a_opt: INTEGER; a_string: READABLE_STRING_GENERAL)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
not_void: a_string /= Void
local
l_api: POINTER
l_c_str: C_STRING
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
create l_c_str.make (a_string)
c_setopt (l_api, a_curl_handle, a_opt, l_c_str.item)
end
end
setopt_form (a_curl_handle: POINTER; a_opt: INTEGER; a_form: CURL_FORM)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
not_void: a_form /= Void and then a_form.is_exists
do
setopt_void_star (a_curl_handle, a_opt, a_form.item)
end
setopt_slist (a_curl_handle: POINTER; a_opt: INTEGER; a_curl_slist: POINTER)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: a_opt = {CURL_OPT_CONSTANTS}.curlopt_httpheader
exists: a_curl_slist /= default_pointer
do
setopt_void_star (a_curl_handle, a_opt, a_curl_slist)
end
setopt_curl_string (a_curl_handle: POINTER; a_opt: INTEGER; a_curl_string: CURL_STRING)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
not_void: a_curl_string /= Void
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
c_setopt_int (l_api, a_curl_handle, a_opt, a_curl_string.object_id)
end
end
setopt_integer (a_curl_handle: POINTER; a_opt: INTEGER; a_integer: INTEGER)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
c_setopt_int (l_api, a_curl_handle, a_opt, a_integer)
end
end
setopt_file (a_curl_handle: POINTER; a_opt: INTEGER; a_file: FILE)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: a_opt = {CURL_OPT_CONSTANTS}.curlopt_readdata
readable: a_file /= Void and then a_file.file_readable
do
setopt_void_star (a_curl_handle, a_opt, a_file.file_pointer)
end
perform (a_curl_handle: POINTER): INTEGER
-- Declared as curl_easy_perform().
-- Result is one value from {CURL_CODES}
require
exists: a_curl_handle /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_perform")
if l_api /= default_pointer then
Result := c_perform (l_api, a_curl_handle)
else
Result := {CURL_CODES}.eiffelcurle_error_occurred
end
end
cleanup (a_curl_handle: POINTER)
-- Declared as curl_easy_cleanup().
require
exists: a_curl_handle /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_cleanup")
if l_api /= default_pointer then
c_cleanup (l_api, a_curl_handle)
end
end
feature -- Query
getinfo (a_curl_handle: POINTER; a_info: INTEGER; a_data: CELL [detachable ANY]): INTEGER
-- `curl_getinfo
--|* Request internal information from the curl session with this function. The
--|* third argument MUST be a pointer to a long, a pointer to a char * or a
--|* pointer to a double (as the documentation describes elsewhere). The data
--|* pointed to will be filled in accordingly and can be relied upon only if the
--|* function returns CURLE_OK. This function is intended to get used *AFTER* a
--|* performed transfer, all results from this function are undefined until the
--|* transfer is completed.
require
exists: a_curl_handle /= default_pointer
valid: (create {CURL_INFO_CONSTANTS}).is_valid (a_info)
local
l_api: POINTER
mp: detachable MANAGED_POINTER
l: INTEGER
cs: C_STRING
d: REAL_64
do
a_data.replace (Void)
l_api := api_loader.api_pointer ("curl_easy_getinfo")
if l_api /= default_pointer then
if a_info & {CURL_INFO_CONSTANTS}.curlinfo_long /= 0 then
create mp.make ({PLATFORM}.integer_32_bytes)
elseif a_info & {CURL_INFO_CONSTANTS}.curlinfo_string /= 0 then
create mp.make ({PLATFORM}.pointer_bytes)
elseif a_info & {CURL_INFO_CONSTANTS}.curlinfo_double /= 0 then
create mp.make ({PLATFORM}.real_64_bytes)
end
if mp /= Void then
Result := c_getinfo (l_api, a_curl_handle, a_info, mp.item)
if Result = {CURL_CODES}.curle_ok then
if a_info & {CURL_INFO_CONSTANTS}.curlinfo_long /= 0 then
l := mp.read_integer_32 (0)
a_data.put (l)
elseif a_info & {CURL_INFO_CONSTANTS}.curlinfo_string /= 0 then
create cs.make_shared_from_pointer (mp.read_pointer (0))
a_data.put (cs.string)
elseif a_info & {CURL_INFO_CONSTANTS}.curlinfo_double /= 0 then
d := mp.read_real_64 (0)
a_data.put (d)
end
end
end
end
end
is_dynamic_library_exists: BOOLEAN
-- If dll/so files exist?
do
Result := api_loader.is_interface_usable
end
feature -- Special setting
set_curl_function (a_curl_function: CURL_FUNCTION)
-- Set `curl_function' with `a_curl_function'
do
internal_curl_function := a_curl_function
ensure
set: a_curl_function /= Void implies curl_function = a_curl_function
end
curl_function: CURL_FUNCTION
-- cURL functions in curl_easy_setopt.
do
if attached internal_curl_function as l_curl_function then
Result := l_curl_function
else
create {CURL_DEFAULT_FUNCTION} Result.make
internal_curl_function := Result
end
ensure
not_void: Result /= Void
end
set_write_function (a_curl_handle: POINTER)
-- Set cURL write function
-- Set cURL write function with Eiffel default write function.
-- So we can use CURL_STRING as parameter in {CURL_EASY_EXTERNALS}.setopt_curl_string when the option is {CURL_OPT_CONSTANTS}.curlopt_writedata
require
exists: a_curl_handle /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
curl_function.c_set_write_function (l_api, a_curl_handle)
end
end
set_read_function (a_curl_handle: POINTER)
-- Set cURL read function
-- Set cURL read function with Eiffel default read function.
-- So we can use a c file pointer as parameter in {CURL_EASY_EXTERNALS}.setopt_file_pointer when the option is {CURL_OPT_CONSTANTS}.curlopt_readdata
require
exists: a_curl_handle /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
curl_function.c_set_read_function (l_api, a_curl_handle)
end
end
set_progress_function (a_curl_handle: POINTER)
-- Set cURL progress function for upload/download progress.
require
exists: a_curl_handle /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
curl_function.c_set_progress_function (l_api, a_curl_handle)
end
end
set_debug_function (a_curl_handle: POINTER)
-- Set cURL debug function
require
exists: a_curl_handle /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
curl_function.c_set_debug_function (l_api, a_curl_handle)
end
end
feature {NONE} -- Implementation
internal_curl_function: detachable CURL_FUNCTION
-- cURL functions.
api_loader: DYNAMIC_MODULE
-- Module name.
local
l_utility: CURL_UTILITY
once
create l_utility
Result := l_utility.api_loader
end
setopt_void_star (a_curl_handle: POINTER; a_opt: INTEGER; a_data:POINTER)
-- Declared as curl_easy_setopt().
require
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_easy_setopt")
if l_api /= default_pointer then
c_setopt (l_api, a_curl_handle, a_opt, a_data)
end
end
feature {NONE} -- C externals
c_init (a_api: POINTER): POINTER
-- Declared curl_easy_init ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURL *, ()) $a_api)();
]"
end
c_cleanup (a_api: POINTER; a_curl_handle: POINTER)
-- Decalred as curl_easy_cleanup ().
require
exists: a_api /= default_pointer
exists: a_curl_handle /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void, (CURL *)) $a_api)((CURL *)$a_curl_handle);
]"
end
c_perform (a_api: POINTER; a_curl_handle: POINTER): INTEGER
-- Declared as curl_easy_perform().
require
exists: a_api /= default_pointer
exists: a_curl_handle /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURLcode, (CURL *)) $a_api)
((CURL *) $a_curl_handle);
]"
end
c_setopt_int (a_api: POINTER; a_curl_handle: POINTER; a_opt: INTEGER; a_data: INTEGER)
-- Same as `c_setopt' except we can pass `a_data' as integer.
require
exists: a_api /= default_pointer
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
external
"C inline use <curl/curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_api)
((CURL *) $a_curl_handle,
(CURLoption)$a_opt,
$a_data);
}
]"
end
c_setopt (a_api: POINTER; a_curl_handle: POINTER; a_opt: INTEGER; a_data: POINTER)
-- C implementation of `setopt_void_star'.
-- Declared as curl_easy_setopt ().
require
exists: a_api /= default_pointer
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
external
"C inline use <curl/curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_api)
((CURL *) $a_curl_handle,
(CURLoption)$a_opt,
$a_data);
}
]"
end
c_getinfo (a_api: POINTER; a_curl_handle: POINTER; a_opt: INTEGER; a_data: POINTER): INTEGER
-- C implementation of `curl_easy_getinfo'.
-- Declared as curl_easy_setopt ().
require
exists: a_api /= default_pointer
exists: a_curl_handle /= default_pointer
valid: (create {CURL_OPT_CONSTANTS}).is_valid (a_opt)
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURLcode, (CURL *, CURLINFO info, ...)) $a_api)
((CURL *) $a_curl_handle,
(CURLINFO)$a_opt,
$a_data);
]"
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2010, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,254 @@
note
description: "[
cURL externals.
For more information, see:
http://curl.haxx.se/libcurl/c/
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_EXTERNALS
feature -- Command
global_init
-- Declared as curl_global_init().
require
dynamic_library_exists: is_dynamic_library_exists
local
l_ptr: POINTER
do
l_ptr := api_loader.api_pointer ("curl_global_init")
if l_ptr /= default_pointer then
c_curl_global_init (l_ptr, {CURL_GLOBAL_CONSTANTS}.curl_global_all);
end
end
global_cleanup
-- Declared as curl_global_cleanup().
local
l_ptr: POINTER
do
l_ptr := api_loader.api_pointer ("curl_global_cleanup")
if l_ptr /= default_pointer then
c_curl_global_cleanup (l_ptr);
end
end
formadd_string_string (a_form: CURL_FORM; a_last_pointer: CURL_FORM; a_arg_1: INTEGER; a_arg_1_value: READABLE_STRING_GENERAL; a_arg_2: INTEGER; a_arg_2_value: READABLE_STRING_GENERAL; a_arg_3: INTEGER)
-- Declared as curl_formadd ().
require
not_void: a_form /= Void
not_void: a_last_pointer /= Void
valid: (create {CURL_FORM_CONSTANTS}).is_valid (a_arg_1)
not_void: a_arg_1_value /= Void
valid: (create {CURL_FORM_CONSTANTS}).is_valid (a_arg_2)
not_void: a_arg_2_value /= Void
valid: (create {CURL_FORM_CONSTANTS}).is_valid (a_arg_3)
local
l_form_pointer, l_last_pointer: POINTER
do
l_form_pointer := a_form.item
l_last_pointer := a_last_pointer.item
internal_formadd_string_string ($l_form_pointer, $l_last_pointer, a_arg_1, a_arg_1_value, a_arg_2, a_arg_2_value, a_arg_3)
if a_form.item /= l_form_pointer then
check not_set: a_form.item = default_pointer end
a_form.set_item (l_form_pointer)
end
if a_last_pointer.item /= l_last_pointer then
a_last_pointer.set_item (l_last_pointer)
end
end
slist_append (a_list: POINTER; a_string: READABLE_STRING_GENERAL): POINTER
-- Declared as curl_slist_append ().
-- note: call with a null `a_list' to get initialized pointer as Result
require
not_void: a_string /= Void
local
l_c_string: C_STRING
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_slist_append")
if l_api /= default_pointer then
create l_c_string.make (a_string)
Result := c_slist_append (l_api, a_list, l_c_string.item)
end
end
slist_free_all (a_curl_slist: POINTER)
-- Declared as curl_slist_free_all ().
-- See: http://curl.haxx.se/libcurl/c/curl_slist_free_all.html
-- curl_slist_free_all - free an entire curl_slist list
-- This must be called when the data has been used, which typically means after the curl_easy_perform(3) has been called.
require
exists: a_curl_slist /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_slist_free_all")
if l_api /= default_pointer then
c_slist_free_all (l_api, a_curl_slist)
end
end
feature -- Query
is_dynamic_library_exists: BOOLEAN
-- If dll/so files exist?
do
Result := api_loader.is_interface_usable
end
feature {CURL_FORM} -- Internal command
formfree (a_curl_form: POINTER)
-- Declared as curl_formfree ().
-- See: http://curl.askapache.com/libcurl/c/curl_formfree.html
-- curl_formfree() is used to clean up data previously built/appended with curl_formadd(3).
-- This must be called when the data has been used, which typically means after the curl_easy_perform(3) has been called.
require
exists: a_curl_form /= default_pointer
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_formfree")
if l_api /= default_pointer then
c_formfree (l_api, a_curl_form)
end
end
feature {NONE} -- Implementation
api_loader: DYNAMIC_MODULE
-- Module name.
local
l_utility: CURL_UTILITY
once
create l_utility
Result := l_utility.api_loader
end
internal_formadd_string_string (a_form: TYPED_POINTER [POINTER]; a_last_pointer: TYPED_POINTER [POINTER]; a_arg_1: INTEGER; a_arg_1_value: READABLE_STRING_GENERAL; a_arg_2: INTEGER; a_arg_2_value: READABLE_STRING_GENERAL; a_arg_3: INTEGER)
-- Declared as curl_formadd ().
local
l_c_string_1, l_c_string_2: C_STRING
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_formadd");
if l_api /= default_pointer then
create l_c_string_1.make (a_arg_1_value)
create l_c_string_2.make (a_arg_2_value)
c_formadd_string_string (l_api, a_form, a_last_pointer, a_arg_1, l_c_string_1.item, a_arg_2, l_c_string_2.item, a_arg_3)
end
end
feature {NONE} -- C externals
c_formadd_string_string (a_api: POINTER; a_form: TYPED_POINTER [POINTER]; a_last_pointer: TYPED_POINTER [POINTER]; a_arg_1: INTEGER; a_arg_1_value: POINTER; a_arg_2: INTEGER; a_arg_2_value: POINTER; a_arg_3: INTEGER)
-- C implementation of formadd_string_string ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (struct curl_httppost **, struct curl_httppost **, int, char *, int, char *, int)) $a_api)
((struct curl_httppost **)$a_form,
(struct curl_httppost **)$a_last_pointer,
(int)$a_arg_1,
(char *)$a_arg_1_value,
(int)$a_arg_2,
(char *)$a_arg_2_value,
(int)$a_arg_3);
}
]"
end
c_formfree (a_api: POINTER; a_curl_form: POINTER)
-- Declared as curl_formfree ().
require
exists: a_api /= default_pointer
exists: a_curl_form /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void, (struct curl_httppost *)) $a_api)
((struct curl_httppost *) $a_curl_form);
]"
end
c_curl_global_init (a_api: POINTER; a_opt: NATURAL_64)
-- `a_api' point to API curl_global_init ()
-- `a_opt' is intialization option.
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void, (long)) $a_api)((long) $a_opt);
]"
end
c_curl_global_cleanup (a_api: POINTER)
-- `a_api' point to API curl_global_cleanup()
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void, ()) $a_api)();
]"
end
c_slist_append (a_api: POINTER; a_list_pointer: POINTER; a_string: POINTER): POINTER
-- Declared as curl_slist_append ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
{
return (FUNCTION_CAST(void *, (struct curl_slist *, const char *)) $a_api)
((struct curl_slist *)$a_list_pointer,
(const char *)$a_string);
}
]"
end
c_slist_free_all (a_api: POINTER; a_list_pointer: POINTER)
-- Declared as void curl_slist_free_all(struct curl_slist * list)
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void *, (struct curl_slist *)) $a_api)
((struct curl_slist *)$a_list_pointer);
]"
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2010, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,94 @@
note
description: "[
cURL form.
For more informaton see:
http://curl.haxx.se/libcurl/c/curl_formadd.html
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_FORM
inherit
DISPOSABLE
create
make,
share_with_pointer
feature {NONE} -- Initialization
make
-- Creation method.
do
end
share_with_pointer (a_pointer: POINTER)
-- Creation method.
-- `item' share with `a_pointer'.
require
exists: a_pointer /= default_pointer
do
item := a_pointer
ensure
set: item = a_pointer
end
feature -- Query
item: POINTER
-- C pointer of Current.
is_exists: BOOLEAN
-- If C pointer exists?
do
Result := item /= default_pointer
end
feature -- Command
dispose
-- Free memory if possible.
local
l_curl: CURL_EXTERNALS
do
if item /= default_pointer then
create l_curl
l_curl.formfree (item)
item := default_pointer
end
end
release_item
-- Release item
-- NOT free memory! This is useful if Current generated by {CURL_EXTERNALS}.formadd_string_string.
do
item := default_pointer
end
feature {CURL_EXTERNALS} -- Internal command
set_item (a_item: POINTER)
-- Set `item' with `a_item'
do
item := a_item
ensure
set: item = a_item
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,78 @@
note
description: "[
cURL form constants.
For more informaton see:
http://curl.haxx.se/libcurl/c/curl_formadd.html
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_FORM_CONSTANTS
feature -- Query
curlform_copyname: INTEGER
-- Declared as CURLFORM_COPYNAME
external
"C inline use <curl/curl.h>"
alias
"[
CURLFORM_COPYNAME
]"
end
curlform_copycontents: INTEGER
-- Declared as CURLFORM_COPYCONTENTS
external
"C inline use <curl/curl.h>"
alias
"[
CURLFORM_COPYCONTENTS
]"
end
curlform_end: INTEGER
-- Declared as CURLFORM_END
external
"C inline use <curl/curl.h>"
alias
"[
CURLFORM_END
]"
end
curlform_file: INTEGER
-- Declared as CURLFORM_FILE
external
"C inline use <curl/curl.h>"
alias
"[
CURLFORM_FILE
]"
end
is_valid (a_integer: INTEGER): BOOLEAN
-- If `a_integer' valid?
do
Result := a_integer = curlform_copycontents or
a_integer = curlform_copyname or
a_integer = curlform_end or
a_integer = curlform_file
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,257 @@
note
description: "[
cURL curl_easy_setopt callback functions' Eiffel wrappers.
We need this class since cURL need a c function pointer as value but
Eiffel function need frist parameter of any funciton call is object address.
Client programmers can inherit this class to fit their needs.
Note: descendants of this class have to call `set_object_and_function_address',
otherwise cURL would not know how to call Eiffel features (such as `write_function').
See example: $ISE_LIBRARY\examples\cURL\upload_and_read_function
See http://curl.haxx.se/libcurl/c/curl_easy_setopt.html for libcurl documentation
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
deferred class
CURL_FUNCTION
inherit
DISPOSABLE
feature -- Interactive with C
set_object_and_function_address
-- Set object and function addresses.
-- Call this feature before call `c_set_progress_function', `c_set_debug_function' and `c_set_write_function, c_set_read_function'.
do
c_set_object ($Current)
c_set_progress_function_address ($progress_function)
c_set_write_function_address ($write_function)
c_set_read_function_address ($read_function)
c_set_debug_function_address ($debug_function)
end
c_set_progress_function (a_setopt_api: POINTER; a_curl_handle: POINTER)
-- Setting CURLOPT_PROGRESSFUNCTION option of `a_curl_handle'.
-- We need this function since cURL need a c function pointer as value.
require
exists: a_setopt_api /= default_pointer
external
"C inline use <eiffel_curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
((CURL *) $a_curl_handle,
(CURLoption)CURLOPT_PROGRESSFUNCTION,
curl_progress_function);
}
]"
end
c_set_debug_function (a_setopt_api: POINTER; a_curl_handle: POINTER)
-- Setting CURLOPT_DEBUGFUNCTION option of `a_curl_handle'.
-- We need this function since cURL need a c function pointer as value.
require
exists: a_curl_handle /= default_pointer
external
"C inline use <eiffel_curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
((CURL *) $a_curl_handle,
(CURLoption)CURLOPT_DEBUGFUNCTION,
curl_debug_function);
}
]"
end
c_set_write_function (a_setopt_api: POINTER; a_curl_handle: POINTER)
-- Setting CURLOPT_WRITEFUNCTION option of `a_curl_handle'.
-- We need this function since cURL need a c function pointer as value.
require
exists: a_setopt_api /= default_pointer
external
"C inline use <eiffel_curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
((CURL *) $a_curl_handle,
(CURLoption)CURLOPT_WRITEFUNCTION,
curl_write_function);
}
]"
end
c_set_read_function (a_setopt_api: POINTER; a_curl_handle: POINTER)
-- Setting CURLOPT_READFUNCTION option of `a_curl_handle'.
-- We need this function since cURL need a c function pointer as value.
require
exists: a_setopt_api /= default_pointer
external
"C inline use <eiffel_curl.h>"
alias
"[
{
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
((CURL *) $a_curl_handle,
(CURLoption)CURLOPT_READFUNCTION,
curl_read_function);
}
]"
end
feature -- cURL curl_easy_setopt functions
progress_function (a_object_id: POINTER; a_download_total, a_download_now, a_upload_total, a_upload_now: REAL_64): INTEGER
-- Function correspond to {CURL_OPT_CONSTANTS}.curlopt_progressfunction
-- Note, pass a {IDENTIFIED}.object_id as `a_object_id' value is helpful since we can't directly pass an Eiffel Object address which
-- may changed during GC.
deferred
end
write_function (a_data_pointer: POINTER; a_size, a_nmemb: INTEGER; a_object_id: POINTER): INTEGER
-- Function called by libcurl as soon as there is data received that needs to be saved.
-- The size of the data pointed to by `a_data_pointer' is `a_size' multiplied with `a_nmemb', it will not be null terminated.
-- Returns the number of bytes actually taken care of
--
-- Function corresponds to {CURL_OPT_CONSTANTS}.curlopt_writefunction
-- Note, pass a {IDENTIFIED}.object_id as `a_object_id' value is helpful since we can't directly pass an Eiffel Object address which
-- may changed during GC.
--| libcurl doc:
--| Function pointer that should match the following prototype: size_t function( char *ptr, size_t size, size_t nmemb, void *userdata);
--| This function gets called by libcurl as soon as there is data received that needs to be saved.
--| The size of the data pointed to by ptr is size multiplied with nmemb, it will not be zero terminated.
--| Return the number of bytes actually taken care of.
--| If that amount differs from the amount passed to your function, it'll signal an error to the library.
--| This will abort the transfer and return CURLE_WRITE_ERROR.
--| From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will cause writing to this connection to become paused.
--| See curl_easy_pause(3) for further details.
--|
--| This function may be called with zero bytes data if the transferred file is empty.
--|
--| Set this option to NULL to get the internal default function.
--| The internal default function will write the data to the FILE * given with CURLOPT_WRITEDATA.
--|
--| Set the userdata argument with the CURLOPT_WRITEDATA option.
--|
--| The callback function will be passed as much data as possible in all invokes,
--| but you cannot possibly make any assumptions. It may be one byte, it may be thousands.
--| The maximum amount of body data that can be passed to the write callback is defined
--| in the curl.h header file: CURL_MAX_WRITE_SIZE (the usual default is 16K).
--| If you however have CURLOPT_HEADER set, which sends header data to the write callback,
--| you can get up to CURL_MAX_HTTP_HEADER bytes of header data passed into it. This usually means 100K.
deferred
end
read_function (a_data_pointer: POINTER; a_size, a_nmemb: INTEGER; a_object_id: POINTER): INTEGER
-- Function called by libcurl as soon as it needs to read data in order to send it to the peer.
-- The data area pointed at by the pointer `a_data_pointer' may be filled with at most
-- `a_size' multiplied with `a_nmemb' number of bytes.
-- Returns the actual number of bytes stored in that memory area.
-- Returning 0 will signal end-of-file to the library and cause it to stop the current transfer.
--
-- Function corresponds to {CURL_OPT_CONSTANTS}.curlopt_readfunction
-- Note, pass a {IDENTIFIED}.object_id as `a_object_id' value is helpful since we can't directly pass an Eiffel Object address which
-- may changed during GC.
--| libcurl doc:
--| Function pointer that should match the following prototype: size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);
--| This function gets called by libcurl as soon as it needs to read data in order to send it to the peer.
--| The data area pointed at by the pointer ptr may be filled with at most size multiplied with nmemb number of bytes.
--| Your function must return the actual number of bytes that you stored in that memory area.
--| Returning 0 will signal end-of-file to the library and cause it to stop the current transfer.
--|
--| If you stop the current transfer by returning 0 "pre-maturely" (i.e before the server expected it,
--| like when you've said you will upload N bytes and you upload less than N bytes),
--| you may experience that the server "hangs" waiting for the rest of the data that won't come.
--|
--| The read callback may return CURL_READFUNC_ABORT to stop the current operation immediately,
--| resulting in a CURLE_ABORTED_BY_CALLBACK error code from the transfer (Added in 7.12.1)
--|
--| From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause reading from this connection to become paused.
--| See curl_easy_pause(3) for further details.
--|
--| Bugs: when doing TFTP uploads, you must return the exact amount of data that the callback wants,
--| or it will be considered the final packet by the server end and the transfer will end there.
--|
--| If you set this callback pointer to NULL, or don't set it at all, the default internal read function will be used.
--| It is doing an fread() on the FILE * userdata set with CURLOPT_READDATA.
deferred
end
debug_function (a_curl_handle: POINTER; a_curl_infotype: INTEGER; a_char_pointer: POINTER; a_size: INTEGER; a_object_id: POINTER): INTEGER
-- Function correspond to {CURL_OPT_CONSTANTS}.curlopt_debugfunction
-- Note, pass a {IDENTIFIED}.object_id as `a_object_id' value is helpful since we can't directly pass an Eiffel Object address which
-- may changed during GC.
require
vaild: (create {CURL_INFO_TYPE}).is_valid (a_curl_infotype)
deferred
end
feature {NONE} -- Externals
c_set_object (a_object: POINTER)
-- Set Current object address.
external
"C signature (EIF_REFERENCE) use %"eiffel_curl.h%""
end
c_release_object
-- Release Current pointer in C
external
"C use %"eiffel_curl.h%""
end
c_set_progress_function_address (a_address: POINTER)
-- Set progress function address.
external
"C use %"eiffel_curl.h%""
end
c_set_write_function_address (a_address: POINTER)
-- Set write function address.
external
"C use %"eiffel_curl.h%""
end
c_set_read_function_address (a_address: POINTER)
-- Set read function address.
external
"C use %"eiffel_curl.h%""
end
c_set_debug_function_address (a_address: POINTER)
-- Set write function address.
external
"C use %"eiffel_curl.h%""
end
feature {NONE} -- Implementation
dispose
-- Wean `Current'
do
c_release_object
c_set_object (default_pointer)
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,78 @@
note
description: "[
cURL library constants used by curl_global_init ()
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_GLOBAL_CONSTANTS
feature -- Query
curl_global_ssl: NATURAL_64
-- Delcared as CURL_GLOBAL_SSL
external
"C inline use <curl/curl.h>"
alias
"[
return CURL_GLOBAL_SSL;
]"
end
curl_global_win32: NATURAL_64
-- Delcared as CURL_GLOBAL_WIN32
external
"C inline use <curl/curl.h>"
alias
"[
return CURL_GLOBAL_WIN32;
]"
end
curl_global_all: NATURAL_64
-- Delcared as CURL_GLOBAL_ALL
external
"C inline use <curl/curl.h>"
alias
"[
return CURL_GLOBAL_ALL;
]"
end
curl_global_nothing: NATURAL_64
-- Delcared as CURL_GLOBAL_NOTHING
external
"C inline use <curl/curl.h>"
alias
"[
return CURL_GLOBAL_NOTHING;
]"
end
curl_global_default: NATURAL_64
-- Delcared as CURL_GLOBAL_DEFAULT
external
"C inline use <curl/curl.h>"
alias
"[
return CURL_GLOBAL_DEFAULT;
]"
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,122 @@
note
description: "[
cURL library info constants.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_INFO_CONSTANTS
feature -- Constants
curlinfo_string: INTEGER = 0x100000
-- Declared as CURLINFO_STRING
curlinfo_long: INTEGER = 0x200000
-- Declared as CURLINFO_LONG
curlinfo_double: INTEGER = 0x300000
-- Declared as CURLINFO_DOUBLE
curlinfo_slist: INTEGER = 0x400000
-- Declared as CURLINFO_SLIST
curlinfo_mask: INTEGER = 0x0fffff
-- Declared as CURLINFO_MASK
curlinfo_typemask: INTEGER = 0xf00000
-- Declared as CURLINFO_TYPEMASK
feature -- Info constants
curlinfo_effective_url: INTEGER = 0x100001 -- CURLINFO_STRING + 1,
curlinfo_response_code: INTEGER = 0x200002 -- CURLINFO_LONG + 2,
curlinfo_total_time: INTEGER = 0x300003 -- CURLINFO_DOUBLE + 3,
curlinfo_namelookup_time: INTEGER = 0x300004 -- CURLINFO_DOUBLE + 4,
curlinfo_connect_time: INTEGER = 0x300005 -- CURLINFO_DOUBLE + 5,
curlinfo_pretransfer_time: INTEGER = 0x300006 -- CURLINFO_DOUBLE + 6,
curlinfo_size_upload: INTEGER = 0x300007 -- CURLINFO_DOUBLE + 7,
curlinfo_size_download: INTEGER = 0x300008 -- CURLINFO_DOUBLE + 8,
curlinfo_speed_download: INTEGER = 0x300009 -- CURLINFO_DOUBLE + 9,
curlinfo_speed_upload: INTEGER = 0x30000a -- CURLINFO_DOUBLE + 10,
curlinfo_header_size: INTEGER = 0x20000b -- CURLINFO_LONG + 11,
curlinfo_request_size: INTEGER = 0x20000c -- CURLINFO_LONG + 12,
curlinfo_ssl_verifyresult: INTEGER = 0x20000d -- CURLINFO_LONG + 13,
curlinfo_filetime: INTEGER = 0x20000e -- CURLINFO_LONG + 14,
curlinfo_content_length_download: INTEGER = 0x30000f -- CURLINFO_DOUBLE + 15,
curlinfo_content_length_upload: INTEGER = 0x300010 -- CURLINFO_DOUBLE + 16,
curlinfo_starttransfer_time: INTEGER = 0x300011 -- CURLINFO_DOUBLE + 17,
curlinfo_content_type: INTEGER = 0x100012 -- CURLINFO_STRING + 18,
curlinfo_redirect_time: INTEGER = 0x300013 -- CURLINFO_DOUBLE + 19,
curlinfo_redirect_count: INTEGER = 0x200014 -- CURLINFO_LONG + 20,
curlinfo_private: INTEGER = 0x100015 -- CURLINFO_STRING + 21,
curlinfo_http_connectcode: INTEGER = 0x200016 -- CURLINFO_LONG + 22,
curlinfo_httpauth_avail: INTEGER = 0x200017 -- CURLINFO_LONG + 23,
curlinfo_proxyauth_avail: INTEGER = 0x200018 -- CURLINFO_LONG + 24,
curlinfo_os_errno: INTEGER = 0x200019 -- CURLINFO_LONG + 25,
curlinfo_num_connects: INTEGER = 0x20001a -- CURLINFO_LONG + 26,
curlinfo_ssl_engines: INTEGER = 0x40001b -- CURLINFO_SLIST + 27,
curlinfo_cookielist: INTEGER = 0x40001c -- CURLINFO_SLIST + 28,
curlinfo_lastsocket: INTEGER = 0x20001d -- CURLINFO_LONG + 29,
curlinfo_ftp_entry_path: INTEGER = 0x10001e -- CURLINFO_STRING + 30,
feature -- Contract support
is_valid (a_code: INTEGER): BOOLEAN
-- Is `a_code' valid?
do
inspect a_code
when
curlinfo_effective_url,
curlinfo_response_code,
curlinfo_total_time,
curlinfo_namelookup_time,
curlinfo_connect_time,
curlinfo_pretransfer_time,
curlinfo_size_upload,
curlinfo_size_download,
curlinfo_speed_download,
curlinfo_speed_upload,
curlinfo_header_size,
curlinfo_request_size,
curlinfo_ssl_verifyresult,
curlinfo_filetime,
curlinfo_content_length_download,
curlinfo_content_length_upload,
curlinfo_starttransfer_time,
curlinfo_content_type,
curlinfo_redirect_time,
curlinfo_redirect_count,
curlinfo_private,
curlinfo_http_connectcode,
curlinfo_httpauth_avail,
curlinfo_proxyauth_avail,
curlinfo_os_errno,
curlinfo_num_connects,
curlinfo_ssl_engines,
curlinfo_cookielist,
curlinfo_lastsocket,
curlinfo_ftp_entry_path
then
Result := True
else
Result := False
end
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,69 @@
note
description: "[
cURL library info type constants.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_INFO_TYPE
feature -- Enumeration
curlinfo_text: INTEGER = 0
-- Declared as CURLINFO_TEXT
curlinfo_header_in: INTEGER = 1
-- Declared as CURLINFO_HEADER_IN
curlinfo_header_out: INTEGER = 2
-- Declared as CURLINFO_HEADER_OUT
curlinfo_data_in: INTEGER = 3
-- Declared as CURLINFO_DATA_IN
curlinfo_data_out: INTEGER = 4
-- Declared as CURLINFO_DATA_OUT
curlinfo_ssl_data_in: INTEGER = 5
-- Declared as CURLINFO_SSL_DATA_IN
curlinfo_ssl_data_out: INTEGER = 6
-- Declared as CURLINFO_SSL_DATA_OUT
feature -- Contract support
is_valid (a_type: INTEGER): BOOLEAN
-- If `a_type' valid?
do
inspect a_type
when
curlinfo_data_in,
curlinfo_data_out,
curlinfo_header_in,
curlinfo_header_out,
curlinfo_ssl_data_in,
curlinfo_ssl_data_out,
curlinfo_text
then
Result := True
else
Result := False
end
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,51 @@
note
description: "[
C CURLMSG enum
]"
date: "$Date$"
revision: "$Revision$"
class
CURL_MSG
feature -- Query
curlmsg_done: INTEGER
-- Declared as CURLMSG_DONE.
-- This easy handle has completed.
-- 'result' contains the CURLcode of the transfer
external
"C inline use <curl/curl.h>"
alias
"return CURLMSG_DONE;"
end
curlmsg_none: INTEGER
-- Declared as CURLMSG_NONE.
-- First, not used
external
"C inline use <curl/curl.h>"
alias
"return CURLMSG_NONE;"
end
curlmsg_last: INTEGER
-- Declared as CURLMSG_LAST.
-- Last, not used
external
"C inline use <curl/curl.h>"
alias
"return CURLMSG_LAST;"
end
note
copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,83 @@
note
description: "[
C Struct CURLMsg wrapper
Read multi stack informationals
This class is used by {CURL_MSG_STRUCT}.info_read
More info:
http://curl.haxx.se/libcurl/c/curl_multi_info_read.html
]"
date: "$Date$"
revision: "$Revision$"
class
CURL_MSG_STRUCT
create
make
feature {NONE} -- Initialization
make (a_pointer: POINTER)
-- Creation method
-- Bind message structure to the address `a_pointer'".
require
not_default: a_pointer /= default_pointer
do
item := a_pointer
ensure
set: item = a_pointer
end
feature -- Query
curl_handle: POINTER
-- CURL easy_handle
-- The handle it concerns
do
Result := c_curl_handle (item)
end
msg: INTEGER
-- What does this message mean?
-- It's one value from {CURLMSG}
do
Result := c_msg (item)
end
feature {NONE} -- Implementation
item: POINTER
-- C struct item
feature {NONE} -- C externals
c_curl_handle (a_item: POINTER): POINTER
-- cURL easy handle it concerns
external
"C inline use <curl/curl.h>"
alias
"return (CURL *)((CURLMsg *)$a_item)->easy_handle;"
end
c_msg (a_item: POINTER): INTEGER
-- Get msg
external
"C inline use <curl/curl.h>"
alias
"return (CURLMSG)((CURLMsg *)$a_item)->msg;"
end
;note
copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,48 @@
note
description: "[
The generic return code used by functions in the libcurl multi interface.
Also consider curl_multi_strerror(3).
]"
date: "$Date$"
revision: "$Revision$"
class
CURL_MULTI_CODES
feature -- Query
curlm_call_multi_perform: INTEGER = -1
-- This is not really an error. It means you should call curl_multi_perform(3) again without doing select() or similar in between.
curlm_ok: INTEGER = 0
-- Things are fine.
curlm_bad_handle: INTEGER = 1
-- The passed-in handle is not a valid CURLM handle.
curlm_bad_easy_handle: INTEGER = 2
-- An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.
curlm_out_of_memory: INTEGER = 3
-- You are doomed.
curlm_internal_error: INTEGER = 4
-- This can only be returned if libcurl bugs. Please report it to us!
curlm_bad_socket: INTEGER = 5
-- The passed-in socket is not a valid one that libcurl already knows about. (Added in 7.15.4)
curlm_unknown_option: INTEGER = 6
-- curl_multi_setopt() with unsupported option (Added in 7.15.4)
note
copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,251 @@
note
description: "[
The multi interface offers several abilities that the easy interface doesn't. They are mainly:
1. Enable a "pull" interface. The application that uses libcurl decides where and when to ask libcurl to get/send data.
2. Enable multiple simultaneous transfers in the same thread without making it complicated for the application.
3. Enable the application to wait for action on its own file descriptors and curl's file descriptors simultaneous easily.
More info: http://curl.haxx.se/libcurl/c/libcurl-multi.html
]"
date: "$Date$"
revision: "$Revision$"
class
CURL_MULTI_EXTERNALS
feature -- Command
init
-- Create a multi handle.
-- If success, Result is a cURL multi hanlde just created.
-- This feature maybe failed in some cases: cannot find required DLL, etc.
-- Then the post condition would be violated.
require
dynamic_library_exists: is_dynamic_library_exists
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_multi_init")
if l_api /= default_pointer then
item := c_init (l_api)
end
end
add_handle (a_easy_handle: POINTER)
-- Add an easy handle to a multi session.
require
dynamic_library_exists: is_dynamic_library_exists
is_multi_handle_exists: is_exists
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_multi_add_handle")
if l_api /= default_pointer then
c_add_handle (l_api, item, a_easy_handle)
end
end
remove_handle (a_easy_handle: POINTER)
-- Remove an easy handle from a multi session.
require
dynamic_library_exists: is_dynamic_library_exists
is_multi_handle_exists: is_exists
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_multi_remove_handle")
if l_api /= default_pointer then
c_remove_handle (l_api, item, a_easy_handle)
end
end
cleanup: INTEGER
-- Close down a multi session.
-- Result is one value from {CURL_MULTI_CODES}.
require
dynamic_library_exists: is_dynamic_library_exists
is_multi_handle_exists: is_exists
local
l_api: POINTER
do
l_api := api_loader.api_pointer ("curl_multi_cleanup")
if l_api /= default_pointer then
Result := c_cleanup (l_api, item)
end
end
perform (a_running_handle: CELL [INTEGER]): INTEGER
-- Reads/writes available data from each easy handle.
-- Result is one value from {CURL_MULTI_CODES}.
require
dynamic_library_exists: is_dynamic_library_exists
is_multi_handle_exists: is_exists
local
l_api: POINTER
l_running_handle: INTEGER
do
l_api := api_loader.api_pointer ("curl_multi_perform")
if l_api /= default_pointer then
Result := c_perform (l_api, item, $l_running_handle)
a_running_handle.put (l_running_handle)
end
end
info_read (a_msgs_in_queue: CELL [INTEGER]): POINTER
-- Read multi stack informationals.
-- The result is C struct CURLMsg {CURL_MSG_STRUCT}.
-- Repeated calls to this function will return a new struct each time, until a NULL
-- is returned as a signal that there is no more to get at this point. The integer
-- pointed to with msgs_in_queue will contain the number of remaining messages after
-- this function was called.
-- When you fetch a message using this function, it is removed from the internal queue
-- so calling this function again will not return the same message again. It will instead
-- return new messages at each new invoke until the queue is emptied.
require
dynamic_library_exists: is_dynamic_library_exists
is_multi_handle_exists: is_exists
local
l_api: POINTER
l_msgs_in_queue: INTEGER
do
l_api := api_loader.api_pointer ("curl_multi_info_read")
if l_api /= default_pointer then
Result := c_info_read (l_api, item, $l_msgs_in_queue)
a_msgs_in_queue.put (l_msgs_in_queue)
end
end
is_dynamic_library_exists: BOOLEAN
-- Are required .dll/.so files available?
do
Result := api_loader.is_interface_usable
end
-- Feature not yet wrapped/tested
-- curl_multi_assign
-- curl_multi_fdset
-- curl_multi_setopt
-- curl_multi_socket
-- curl_multi_socket_action
-- curl_multi_strerror
-- curl_multi_timeout
feature -- Query
is_exists: BOOLEAN
-- If C pointer exists?
do
Result := item /= default_pointer
end
feature {NONE} -- Implementation
item: POINTER
-- C pointer item for cURL multi
feature {NONE} -- C externals
c_init (a_api: POINTER): POINTER
-- Declared as curl_multi_init ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURLM *, ()) $a_api)();
]"
end
c_cleanup (a_api: POINTER; a_multi_handle: POINTER): INTEGER
-- Declared as curl_multi_cleanup ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURLMcode, (CURLM *)) $a_api)
((CURLM *)$a_multi_handle);
]"
end
c_add_handle (a_api: POINTER; a_multi_handle: POINTER; a_easy_handle: POINTER)
-- Declared as curl_multi_add_handle ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void, (CURLM *, CURL *)) $a_api)
((CURLM *) $a_multi_handle,
(CURL *) $a_easy_handle);
]"
end
c_remove_handle (a_api: POINTER; a_multi_handle: POINTER; a_easy_handle: POINTER)
-- Declared as curl_multi_remove_handle ().
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
(FUNCTION_CAST(void, (CURLM *, CURL *)) $a_api)
((CURLM *) $a_multi_handle,
(CURL *) $a_easy_handle);
]"
end
c_perform (a_api: POINTER; a_multi_handle: POINTER; a_running_handles: TYPED_POINTER [INTEGER]): INTEGER
-- Declared as curl_multi_perform.
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURLMcode, (CURLM *, int *)) $a_api)
((CURLM *) $a_multi_handle,
(int *) $a_running_handles);
]"
end
c_info_read (a_api: POINTER; a_multi_handle: POINTER; a_msgs_in_queue: TYPED_POINTER [INTEGER]): POINTER
-- Declared as curl_multi_info_read.
require
exists: a_api /= default_pointer
external
"C inline use <curl/curl.h>"
alias
"[
return (FUNCTION_CAST(CURLMsg *, (CURLM *, int *)) $a_api)
((CURLM *) $a_multi_handle,
(int *) $a_msgs_in_queue);
]"
end
feature {NONE} -- Implementation
api_loader: DYNAMIC_MODULE
-- Module name.
local
l_utility: CURL_UTILITY
once
create l_utility
Result := l_utility.api_loader
end
note
copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
note
description: "[
String used by cURL wrapper library.
Only added features from IDENTIFIED.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_STRING
inherit
STRING
select
is_equal,
copy,
out
end
IDENTIFIED
rename
is_equal as identified_is_equal,
copy as identified_copy,
out as identified_out
end
create
make,
make_empty,
make_filled,
make_from_string,
make_from_c,
make_from_cil
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,51 @@
note
description: "[
Utilities for Eiffel cURL wrapper library.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
CURL_UTILITY
feature -- Query
api_loader: DYNAMIC_MODULE
-- API dynamic loader
local
l_platform: PLATFORM
once
create l_platform
if l_platform.is_unix or l_platform.is_mac then
create Result.make_with_version (module_name, "3")
else
check is_window: l_platform.is_windows end
create Result.make (module_name)
end
ensure
not_void: Result /= Void
end
module_name: STRING
-- Module name.
once
Result := "libcurl"
ensure
not_void: Result /= Void
end
note
library: "cURL: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1,65 @@
note
description: "[
Interactive with native system APIs for dynamic loading.
Cocoa verson.
]"
status: "See notice at end of class."
legal: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
API_LOADER_IMP
feature -- Command
load_module (a_name: STRING): POINTER
-- Load module with `a_name'.
require
exists: a_name /= Void
do
-- fixme: implement
end
loal_api (a_module: POINTER; a_name: STRING): POINTER
-- Load api which name is `a_name' in `a_module'
require
exists: a_module /= default_pointer
exists: a_name /= Void
do
-- fixme: implement
end
note
copyright: "Copyright (c) 1984-2007, Eiffel Software"
license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
licensing_options: "http://www.eiffel.com/licensing"
copying: "[
This file is part of Eiffel Software's Eiffel Development Environment.
Eiffel Software's Eiffel Development Environment is free
software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published
by the Free Software Foundation, version 2 of the License
(available at the URL listed under "license" above).
Eiffel Software's Eiffel Development Environment 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with Eiffel Software's Eiffel Development
Environment; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
]"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -0,0 +1 @@
reference:forum2

View File

@@ -0,0 +1,5 @@
When your Eiffel executable running, Eiffel cURL library needs 3 DLLs, they are:
libcurl.dll, libeay32.dll and ssleay32.dll
Please make sure the 3 DLLs files can be found in your environment PATH or in same folder of your executable.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
#ifndef __CURL_CURLVER_H
#define __CURL_CURLVER_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
/* This header file contains nothing but libcurl version info, generated by
a script at release-time. This was made its own header file in 7.11.2 */
/* This is the version number of the libcurl package from which this header
file origins: */
#define LIBCURL_VERSION "7.17.0"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 17
#define LIBCURL_VERSION_PATCH 0
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
always follow this syntax:
0xXXYYZZ
Where XX, YY and ZZ are the main version, release and patch numbers in
hexadecimal (using 8 bits each). All three numbers are always represented
using two digits. 1.2 would appear as "0x010200" while version 9.11.7
appears as "0x090b07".
This 6-digit (24 bits) hexadecimal number does not show pre-release number,
and it is always a greater number in a more recent release. It makes
comparisons with greater than and less than work.
*/
#define LIBCURL_VERSION_NUM 0x071100
/*
* This is the date and time when the full source package was created. The
* timestamp is not stored in CVS, as the timestamp is properly set in the
* tarballs by the maketgz script.
*
* The format of the date should follow this template:
*
* "Mon Feb 12 11:35:33 UTC 2007"
*/
#define LIBCURL_TIMESTAMP "Thu Sep 13 20:22:24 UTC 2007"
#endif /* __CURL_CURLVER_H */

View File

@@ -0,0 +1,81 @@
#ifndef __CURL_EASY_H
#define __CURL_EASY_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
CURL_EXTERN CURL *curl_easy_init(void);
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
CURL_EXTERN void curl_easy_cleanup(CURL *curl);
/*
* NAME curl_easy_getinfo()
*
* DESCRIPTION
*
* Request internal information from the curl session with this function. The
* third argument MUST be a pointer to a long, a pointer to a char * or a
* pointer to a double (as the documentation describes elsewhere). The data
* pointed to will be filled in accordingly and can be relied upon only if the
* function returns CURLE_OK. This function is intended to get used *AFTER* a
* performed transfer, all results from this function are undefined until the
* transfer is completed.
*/
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
/*
* NAME curl_easy_duphandle()
*
* DESCRIPTION
*
* Creates a new curl session handle with the same options set for the handle
* passed in. Duplicating a handle could only be a matter of cloning data and
* options, internal state info and things like persistant connections cannot
* be transfered. It is useful in multithreaded applications when you can run
* curl_easy_duphandle() for each new thread to avoid a series of identical
* curl_easy_setopt() invokes in every thread.
*/
CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
/*
* NAME curl_easy_reset()
*
* DESCRIPTION
*
* Re-initializes a CURL handle to the default values. This puts back the
* handle to the same state as it was in when it was just created.
*
* It does keep: live connections, the Session ID cache, the DNS cache and the
* cookies.
*/
CURL_EXTERN void curl_easy_reset(CURL *curl);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,80 @@
#ifndef __CURL_MPRINTF_H
#define __CURL_MPRINTF_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
#include <stdarg.h>
#include <stdio.h> /* needed for FILE */
#include "curl.h"
#ifdef __cplusplus
extern "C" {
#endif
CURL_EXTERN int curl_mprintf(const char *format, ...);
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...);
CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args);
CURL_EXTERN char *curl_maprintf(const char *format, ...);
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
#ifdef _MPRINTF_REPLACE
# undef printf
# undef fprintf
# undef sprintf
# undef vsprintf
# undef snprintf
# undef vprintf
# undef vfprintf
# undef vsnprintf
# undef aprintf
# undef vaprintf
# define printf curl_mprintf
# define fprintf curl_mfprintf
#ifdef CURLDEBUG
/* When built with CURLDEBUG we define away the sprintf() functions since we
don't want internal code to be using them */
# define sprintf sprintf_was_used
# define vsprintf vsprintf_was_used
#else
# define sprintf curl_msprintf
# define vsprintf curl_mvsprintf
#endif
# define snprintf curl_msnprintf
# define vprintf curl_mvprintf
# define vfprintf curl_mvfprintf
# define vsnprintf curl_mvsnprintf
# define aprintf curl_maprintf
# define vaprintf curl_mvaprintf
#endif
#ifdef __cplusplus
}
#endif
#endif /* __CURL_MPRINTF_H */

View File

@@ -0,0 +1,346 @@
#ifndef __CURL_MULTI_H
#define __CURL_MULTI_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
/*
This is an "external" header file. Don't give away any internals here!
GOALS
o Enable a "pull" interface. The application that uses libcurl decides where
and when to ask libcurl to get/send data.
o Enable multiple simultaneous transfers in the same thread without making it
complicated for the application.
o Enable the application to select() on its own file descriptors and curl's
file descriptors simultaneous easily.
*/
/*
* This header file should not really need to include "curl.h" since curl.h
* itself includes this file and we expect user applications to do #include
* <curl/curl.h> without the need for especially including multi.h.
*
* For some reason we added this include here at one point, and rather than to
* break existing (wrongly written) libcurl applications, we leave it as-is
* but with this warning attached.
*/
#include "curl.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef void CURLM;
typedef enum {
CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
curl_multi_socket*() soon */
CURLM_OK,
CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */
CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
CURLM_LAST
} CURLMcode;
/* just to make code nicer when using curl_multi_socket() you can now check
for CURLM_CALL_MULTI_SOCKET too in the same style it works for
curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
typedef enum {
CURLMSG_NONE, /* first, not used */
CURLMSG_DONE, /* This easy handle has completed. 'result' contains
the CURLcode of the transfer */
CURLMSG_LAST /* last, not used */
} CURLMSG;
struct CURLMsg {
CURLMSG msg; /* what this message means */
CURL *easy_handle; /* the handle it concerns */
union {
void *whatever; /* message-specific data */
CURLcode result; /* return code for transfer */
} data;
};
typedef struct CURLMsg CURLMsg;
/*
* Name: curl_multi_init()
*
* Desc: inititalize multi-style curl usage
*
* Returns: a new CURLM handle to use in all 'curl_multi' functions.
*/
CURL_EXTERN CURLM *curl_multi_init(void);
/*
* Name: curl_multi_add_handle()
*
* Desc: add a standard curl handle to the multi stack
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
CURL *curl_handle);
/*
* Name: curl_multi_remove_handle()
*
* Desc: removes a curl handle from the multi stack again
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
CURL *curl_handle);
/*
* Name: curl_multi_fdset()
*
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
* poll() on. We want curl_multi_perform() called as soon as one of
* them are ready.
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
fd_set *read_fd_set,
fd_set *write_fd_set,
fd_set *exc_fd_set,
int *max_fd);
/*
* Name: curl_multi_perform()
*
* Desc: When the app thinks there's data available for curl it calls this
* function to read/write whatever there is right now. This returns
* as soon as the reads and writes are done. This function does not
* require that there actually is data available for reading or that
* data can be written, it can be called just in case. It returns
* the number of handles that still transfer data in the second
* argument's integer-pointer.
*
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
* returns errors etc regarding the whole multi stack. There might
* still have occurred problems on invidual transfers even when this
* returns OK.
*/
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
int *running_handles);
/*
* Name: curl_multi_cleanup()
*
* Desc: Cleans up and removes a whole multi stack. It does not free or
* touch any individual easy handles in any way. We need to define
* in what state those handles will be if this function is called
* in the middle of a transfer.
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
/*
* Name: curl_multi_info_read()
*
* Desc: Ask the multi handle if there's any messages/informationals from
* the individual transfers. Messages include informationals such as
* error code from the transfer or just the fact that a transfer is
* completed. More details on these should be written down as well.
*
* Repeated calls to this function will return a new struct each
* time, until a special "end of msgs" struct is returned as a signal
* that there is no more to get at this point.
*
* The data the returned pointer points to will not survive calling
* curl_multi_cleanup().
*
* The 'CURLMsg' struct is meant to be very simple and only contain
* very basic informations. If more involved information is wanted,
* we will provide the particular "transfer handle" in that struct
* and that should/could/would be used in subsequent
* curl_easy_getinfo() calls (or similar). The point being that we
* must never expose complex structs to applications, as then we'll
* undoubtably get backwards compatibility problems in the future.
*
* Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
* of structs. It also writes the number of messages left in the
* queue (after this read) in the integer the second argument points
* to.
*/
CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
int *msgs_in_queue);
/*
* Name: curl_multi_strerror()
*
* Desc: The curl_multi_strerror function may be used to turn a CURLMcode
* value into the equivalent human readable error string. This is
* useful for printing meaningful error messages.
*
* Returns: A pointer to a zero-terminated error message.
*/
CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
/*
* Name: curl_multi_socket() and
* curl_multi_socket_all()
*
* Desc: An alternative version of curl_multi_perform() that allows the
* application to pass in one of the file descriptors that have been
* detected to have "action" on them and let libcurl perform.
* See man page for details.
*/
#define CURL_POLL_NONE 0
#define CURL_POLL_IN 1
#define CURL_POLL_OUT 2
#define CURL_POLL_INOUT 3
#define CURL_POLL_REMOVE 4
#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD
#define CURL_CSELECT_IN 0x01
#define CURL_CSELECT_OUT 0x02
#define CURL_CSELECT_ERR 0x04
typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
int what, /* see above */
void *userp, /* private callback
pointer */
void *socketp); /* private socket
pointer */
/*
* Name: curl_multi_timer_callback
*
* Desc: Called by libcurl whenever the library detects a change in the
* maximum number of milliseconds the app is allowed to wait before
* curl_multi_socket() or curl_multi_perform() must be called
* (to allow libcurl's timed events to take place).
*
* Returns: The callback should return zero.
*/
typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
long timeout_ms, /* see above */
void *userp); /* private callback
pointer */
CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,
int *running_handles);
CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
curl_socket_t s,
int ev_bitmask,
int *running_handles);
CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,
int *running_handles);
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
/* This macro below was added in 7.16.3 to push users who recompile to use
the new curl_multi_socket_action() instead of the old curl_multi_socket()
*/
#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
#endif
/*
* Name: curl_multi_timeout()
*
* Desc: Returns the maximum number of milliseconds the app is allowed to
* wait before curl_multi_socket() or curl_multi_perform() must be
* called (to allow libcurl's timed events to take place).
*
* Returns: CURLM error code.
*/
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
long *milliseconds);
#undef CINIT /* re-using the same name as in curl.h */
#ifdef CURL_ISOCPP
#define CINIT(name,type,number) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + number
#else
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
#define LONG CURLOPTTYPE_LONG
#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
#define OFF_T CURLOPTTYPE_OFF_T
#define CINIT(name,type,number) CURLMOPT_/**/name = type + number
#endif
typedef enum {
/* This is the socket callback function pointer */
CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1),
/* This is the argument passed to the socket callback */
CINIT(SOCKETDATA, OBJECTPOINT, 2),
/* set to 1 to enable pipelining for this multi handle */
CINIT(PIPELINING, LONG, 3),
/* This is the timer callback function pointer */
CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4),
/* This is the argument passed to the timer callback */
CINIT(TIMERDATA, OBJECTPOINT, 5),
/* maximum number of entries in the connection cache */
CINIT(MAXCONNECTS, LONG, 6),
CURLMOPT_LASTENTRY /* the last unused */
} CURLMoption;
/*
* Name: curl_multi_setopt()
*
* Desc: Sets options for the multi handle.
*
* Returns: CURLM error code.
*/
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
CURLMoption option, ...);
/*
* Name: curl_multi_assign()
*
* Desc: This function sets an association in the multi handle between the
* given socket and a private pointer of the application. This is
* (only) useful for curl_multi_socket uses.
*
* Returns: CURLM error code.
*/
CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
curl_socket_t sockfd, void *sockp);
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif

View File

@@ -0,0 +1,34 @@
#ifndef __STDC_HEADERS_H
#define __STDC_HEADERS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
#include <sys/types.h>
size_t fread (void *, size_t, size_t, FILE *);
size_t fwrite (const void *, size_t, size_t, FILE *);
int strcasecmp(const char *, const char *);
int strncasecmp(const char *, const char *, size_t);
#endif

View File

@@ -0,0 +1 @@
/* not used */

View File

@@ -0,0 +1,47 @@
/*
indexing
description: "Functions used by the class CURL_FUNCTION."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
*/
#ifndef _eiffel_curl_h_
#define _eiffel_curl_h_
#include "eif_eiffel.h"
/* unix-specific */
#ifndef EIF_WINDOWS
#include <sys/time.h>
#include <unistd.h>
#endif
#include <curl/curl.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void c_set_object(EIF_REFERENCE a_address);
extern void c_release_object(void);
extern void c_set_progress_function_address( EIF_POINTER a_address);
extern void c_set_read_function_address( EIF_POINTER a_address);
extern void c_set_write_function_address( EIF_POINTER a_address);
extern void c_set_debug_function_address (EIF_POINTER a_address);
extern size_t curl_write_function (void *ptr, size_t size, size_t nmemb, void *data);
extern size_t curl_read_function (void *ptr, size_t size, size_t nmemb, void *data);
extern size_t curl_progress_function (void * a_object_id, double a_dltotal, double a_dlnow, double a_ultotal, double a_ulnow);
extern size_t curl_debug_function (CURL * a_curl_handle, curl_infotype a_curl_infotype, unsigned char * a_char_pointer, size_t a_size, void * a_object_id);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,4 @@
Eiffel Arbitrary Precision Mathematics Library
Contribution from Colin LeMahieu
see original source: https://github.com/clemahieu/eapml

View File

@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-6-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-6-0 http://www.eiffel.com/developers/xml/configuration-1-6-0.xsd" name="eapml" uuid="3E9258E1-383A-40BF-864B-231FC8F25ADF" library_target="eapml">
<description>Eiffel Arbitrary Precision Mathematics Library</description>
<description>Eiffel Arbitrary Precision Mathematics Library
Note: you should set 'eapml_scan_type' to 'gcc' or 'vc'
and 'eapml_limb_type' to 'natural_32' (or 'natural_64')
If not, default values will be used depending on the platform
</description>
<target name="eapml">
<file_rule>
<exclude>/.svn$</exclude>
@@ -14,37 +20,48 @@
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<cluster name="bit_scan_gcc" location=".\bit_scan_gcc\" recursive="true">
<cluster name="bit_scan_gcc" location=".\src\bit_scan_gcc\" recursive="true">
<condition>
<custom name="eapml_scan_type" value="gcc"/>
</condition>
<condition>
<platform excluded_value="windows"/>
<custom name="eapml_scan_type" excluded_value="vc"/>
</condition>
</cluster>
<cluster name="bit_scan_vc" location=".\bit_scan_vc\" recursive="true">
<cluster name="bit_scan_vc" location=".\src\bit_scan_vc\" recursive="true">
<condition>
<custom name="eapml_scan_type" value="vc"/>
</condition>
<condition>
<platform value="windows"/>
<custom name="eapml_scan_type" excluded_value="gcc"/>
</condition>
</cluster>
<cluster name="eapml" location=".\" recursive="true">
<cluster name="eapml" location=".\src\" recursive="true">
<file_rule>
<exclude>/bit_scan_vc$</exclude>
<exclude>/tests$</exclude>
<exclude>/limb_natural_64$</exclude>
<exclude>/bit_scan_gcc$</exclude>
<exclude>/limb_natural_32$</exclude>
<exclude>/limb_natural_64$</exclude>
</file_rule>
<file_rule>
<exclude>^/mp/number/support$</exclude>
</file_rule>
</cluster>
<cluster name="limb_natural_32" location=".\limb_natural_32\" recursive="true">
<cluster name="limb_natural_32" location=".\src\limb_natural_32\" recursive="true">
<!--
<condition>
<custom name="eapml_limb_type" value="natural_32"/>
</condition>
-->
</cluster>
<cluster name="limb_natural_64" location=".\limb_natural_64\" recursive="true">
<!--
<cluster name="limb_natural_64" location=".\src\limb_natural_64\" recursive="true">
<condition>
<custom name="eapml_limb_type" value="natural_64"/>
</condition>
</cluster>
-->
</target>
</system>

View File

@@ -1,34 +1,46 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-5-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd" name="eapml" uuid="3E9258E1-383A-40BF-864B-231FC8F25ADF" library_target="eapml">
<description>Eiffel Arbitrary Precision Mathematics Library</description>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-9-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-9-0 http://www.eiffel.com/developers/xml/configuration-1-9-0.xsd" name="eapml" uuid="3E9258E1-383A-40BF-864B-231FC8F25ADF" library_target="eapml">
<description>Eiffel Arbitrary Precision Mathematics Library
Note: you should set 'eapml_scan_type' to 'gcc' or 'vc'
and 'eapml_limb_type' to 'natural_32' (or 'natural_64')
If not, default values will be used depending on the platform
</description>
<target name="eapml">
<description>Eiffel Arbitrary Precision Mathematics</description>
<root all_classes="true"/>
<file_rule>
<exclude>/EIFGENs$</exclude>
<exclude>/CVS$</exclude>
<exclude>/\.svn$</exclude>
<exclude>/\.hg$</exclude>
<exclude>/CVS$</exclude>
<exclude>/EIFGENs$</exclude>
</file_rule>
<option warning="true" full_class_checking="true" is_attached_by_default="false" void_safety="none" syntax="standard">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<cluster name="bit_scan_gcc" location=".\bit_scan_gcc\" recursive="true">
<cluster name="bit_scan_gcc" location=".\src\bit_scan_gcc\" recursive="true">
<condition>
<custom name="eapml_scan_type" value="gcc"/>
</condition>
<condition>
<platform excluded_value="windows"/>
<custom name="eapml_scan_type" excluded_value="vc"/>
</condition>
</cluster>
<cluster name="bit_scan_vc" location=".\bit_scan_vc\" recursive="true">
<cluster name="bit_scan_vc" location=".\src\bit_scan_vc\" recursive="true">
<condition>
<custom name="eapml_scan_type" value="vc"/>
</condition>
<condition>
<platform value="windows"/>
<custom name="eapml_scan_type" excluded_value="gcc"/>
</condition>
</cluster>
<cluster name="eapml" location=".\" recursive="true">
<cluster name="eapml" location=".\src\" recursive="true">
<file_rule>
<exclude>/bit_scan_vc$</exclude>
<exclude>/bit_scan_gcc$</exclude>
<exclude>/tests$</exclude>
<exclude>/limb_natural_32$</exclude>
<exclude>/limb_natural_64$</exclude>
</file_rule>
@@ -36,15 +48,19 @@
<exclude>^/mp/number/support$</exclude>
</file_rule>
</cluster>
<cluster name="limb_natural_32" location=".\limb_natural_32\" recursive="true">
<cluster name="limb_natural_32" location=".\src\limb_natural_32\" recursive="true">
<!--
<condition>
<custom name="eapml_limb_type" value="natural_32"/>
</condition>
-->
</cluster>
<cluster name="limb_natural_64" location=".\limb_natural_64\" recursive="true">
<!--
<cluster name="limb_natural_64" location=".\src\limb_natural_64\" recursive="true">
<condition>
<custom name="eapml_limb_type" value="natural_64"/>
</condition>
</cluster>
-->
</target>
</system>

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {LIMB_BIT_SCANNING}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
deferred class
LIMB_BIT_SCANNING

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {LIMB_BIT_SCANNING}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
deferred class
LIMB_BIT_SCANNING

View File

@@ -1,8 +1,8 @@
note
description: "An exception when dividing by zero"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "A right is not what someone gives you; it's what no one can take from you. - Ramsey Clark, U.S. Attorney General, New York Times, 10/02/77"
class

View File

@@ -1,8 +1,8 @@
note
description: "Convert between character codes and numbers ignoring case"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "There can be no freedom without freedom to fail. - Eric Hoffer (1902-1983), The Ordeal of Change, 1964"
class

View File

@@ -1,8 +1,8 @@
note
description: "Convert between character codes and numbers case-sensitive"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "I believe the State exists for the development of individual lives, not individuals for the development of the state. - Julian Huxley (1878-1975)"
class

View File

@@ -1,8 +1,8 @@
note
description: "A strategy for converting character codes to numbers and vica-versa"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Free speech is meaningless unless it tolerates the speech that we hate. - Henry J. Hyde, U.S. Congressman, Speech, 5/3/91"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_ACCESS}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "It is error alone which needs the support of government. Truth can stand by itself. - Thomas Jefferson (1743-1846), U.S. President, Notes on the State of Virginia, 1782"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_ARITHMETIC}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Every man should know that his conversations, his correspondence, and his personal life are private. - Lyndon B. Johnson (1908-1973), Remarks, 3/10/67"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_ASSIGNMENT}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "The object and practice of liberty lies in the limitation of governmental power. - General Douglas MacArthur"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_COMPARISON}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "The marvel of all history is the patience with which men and women submit to burdens unnecessarily laid upon them by their governments. - U.S. Senator William Borah"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_DIVISION}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Collecting more taxes than is absolutely necessary is legalized robbery. - President Calvin Coolidge"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_FACILITIES}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Concentrated power is not rendered harmless by the good intentions of those who create it. - Milton Friedman, Nobel prize-winning economist"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_GCD}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "'Need' now means wanting someone else's money. 'Greed' means wanting to keep your own. 'Compassion' is when a politician arranges the transfer. - Joseph Sobran, columnist."
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_IO}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "I personally call the type of government which can be removed without violence 'democracy,' and the other, 'tyranny.' - Karl Popper"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_LOGIC}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "The politicians don't just want your money. They want your soul. They want you to be worn down by taxes until you are dependent and helpless. - James Dale Davidson, National Taxpayers Union"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_NUMBER_THEORY}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Gun registration is a gateway drug. - Mark Gilmore"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_RANDOM}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Letting lawyers make laws is like letting doctors make diseases. - Anonymous"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_SIZING}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "My freedom is more important than your great idea. - Anonymous"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Statistics about each base representation"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "As the growing emphasis on feelings crowds out reason, facts will play a smaller role in public discourse. - Paul Craig Roberts"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {POWERS}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Giving a politician access to your wallet is like giving a dog access to your refrigerator. - Tim Barber"
class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {RAND_LC_STRUCT}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Everyone wants to save the planet but no one wants to help Mom clean the dishes. - P.J. O'Rourke, in All the Trouble in the World "
class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_ACCESS}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "State-mandated compassion produces, not love for ones fellow man, but hatred and resentment. - Lizard"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_ARITHMETIC}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Dependence leads to subservience. - Thomas Jefferson"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_ASSIGNMENT}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Concentrated political power is the most dangerous thing on earth. - Rudolph Rummel"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_COMPARISON}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "No nation was ever ruined by trade. - Benjamin Franklin"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_DIVISION}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Freedom is the emancipation from the arbitrary rule of other men. - Mortimer Adler (1902-2001)"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_GCD}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "My reading of history convinces me that most bad government results from too much government. - Thomas Jefferson."
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_LOGIC}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "It is a free market that makes monopolies impossible. - Ayn Rand"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_NUMBER_THEORETIC}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "The best argument against democracy is a five-minute conversation with the average voter. - Winston Churchill"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_SIZING}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Whatever you do will be insignificant, but it is very important that you do it. - Mahatma Gandhi"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {NUMBER_UTILITY}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "If a law is unjust, a man is not only right to disobey it, he is obligated to do so. - Thomas Jefferson"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "An INTEGER_X whos value cannot change"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Freedom is the emancipation from the arbitrary rule of other men. - Mortimer Adler (1902-2001)"
class

View File

@@ -1,8 +1,8 @@
note
description: "An arbitrary precision integer"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "'For your own good' is a persuasive argument that will eventually make a man agree to his own destruction. - Janet Frame, Faces In The Water, 1982"
class

View File

@@ -1,8 +1,8 @@
note
description: "An exception when a {STRING} couldn't be parsed in to a {INTEGER_X}"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Heresy is only another word for freedom of thought. - Graham Greene (1904-1991)"
class

View File

@@ -1,8 +1,8 @@
note
description: "An exception when an {INTEGER_X} doesn't have a modular inverse"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Whenever they burn books they will also, in the end, burn human beings. - Heinrich Heine (1797-1856), Almansor: A Tragedy, 1823"
class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {LIMB_DEFINITION}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
deferred class
LIMB_DEFINITION

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {LIMB_MANIPULATION}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
deferred class
LIMB_MANIPULATION

View File

@@ -1,8 +1,8 @@
note
description: "A Linear congruential random number generator"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "To limit the press is to insult a nation; to prohibit reading of certain books is to declare the inhabitants to be either fools or knaves. - Claude-Adrien Helvetius"
class

View File

@@ -1,8 +1,8 @@
note
description: "A Mersenne twister RNG"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "A censor is a man who knows more than he thinks you ought to. - Granville Hicks (1901-1982)"
class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {RANDSTRUCT}."
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "Where men cannot freely convey their thoughts to one another, no other liberty is secure. - William E. Hocking (1873-1966), Freedom of the Press, 1947"
deferred class

View File

@@ -1,8 +1,8 @@
note
description: "Functionality to query the status of an arbitrary precision integer"
author: "Colin LeMahieu"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
quote: "The urge to save humanity is almost always a false front for the urge to rule. - H.L. Mencken"
deferred class

View File

@@ -1,7 +1,7 @@
note
description : "Library unit test root class"
date : "$Date: 2008-12-29 15:41:59 -0800 (Mon, 29 Dec 2008) $"
revision : "$Revision: 76432 $"
date : "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision : "$Revision: 87787 $"
class
TEST

View File

@@ -3,8 +3,8 @@ note
Eiffel tests that can be executed by testing tool.
]"
author: "EiffelStudio test wizard"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
testing: "type/manual"
class

View File

@@ -3,8 +3,8 @@ note
Eiffel tests that can be executed by testing tool.
]"
author: "EiffelStudio test wizard"
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
testing: "type/manual"
class

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {TEST_INTEGER_X_ACCESS}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
class
TEST_INTEGER_X_ACCESS

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {TEST_INTEGER_ARITHMETIC}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
class
TEST_INTEGER_X_ARITHMETIC

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {TEST_INTEGER_X_ASSIGNMENT}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
class
TEST_INTEGER_X_ASSIGNMENT

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {INTEGER_X_DIVISION}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
class
TEST_INTEGER_X_DIVISION

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {TEST_INTEGER_X_GCD}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
class
TEST_INTEGER_X_GCD

View File

@@ -1,8 +1,8 @@
note
description: "Summary description for {TEST_INTEGER_X_IO}."
author: ""
date: "$Date$"
revision: "$Revision$"
date: "$Date: 2011-11-11 18:13:16 +0100 (ven., 11 nov. 2011) $"
revision: "$Revision: 87787 $"
class
TEST_INTEGER_X_IO

Some files were not shown because too many files have changed in this diff Show More