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
This commit is contained in:
@@ -149,8 +149,14 @@ feature {NONE} -- Implementation
|
|||||||
not_void: Result /= Void
|
not_void: Result /= Void
|
||||||
end
|
end
|
||||||
|
|
||||||
module_name: STRING is "libcurl.dll"
|
module_name: STRING is
|
||||||
-- Module name.
|
-- Module name.
|
||||||
|
local
|
||||||
|
l_utility: CURL_UTILITY
|
||||||
|
once
|
||||||
|
create l_utility
|
||||||
|
Result := l_utility.module_name
|
||||||
|
end
|
||||||
|
|
||||||
setopt_void_star (a_curl_handle: POINTER; a_opt: INTEGER; a_data:POINTER) is
|
setopt_void_star (a_curl_handle: POINTER; a_opt: INTEGER; a_data:POINTER) is
|
||||||
-- Declared as curl_easy_setopt().
|
-- Declared as curl_easy_setopt().
|
||||||
@@ -218,10 +224,10 @@ feature {NONE} -- C externals
|
|||||||
alias
|
alias
|
||||||
"[
|
"[
|
||||||
{
|
{
|
||||||
(FUNCTION_CAST(void, (CURL *, CURLoption, CURLoption)) $a_api)
|
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_api)
|
||||||
((CURL *) $a_curl_handle,
|
((CURL *) $a_curl_handle,
|
||||||
(CURLoption)$a_opt,
|
(CURLoption)$a_opt,
|
||||||
(CURLoption)$a_data);
|
$a_data);
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
end
|
end
|
||||||
@@ -238,10 +244,10 @@ feature {NONE} -- C externals
|
|||||||
alias
|
alias
|
||||||
"[
|
"[
|
||||||
{
|
{
|
||||||
(FUNCTION_CAST(void, (CURL *, CURLoption, CURLoption)) $a_api)
|
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_api)
|
||||||
((CURL *) $a_curl_handle,
|
((CURL *) $a_curl_handle,
|
||||||
(CURLoption)$a_opt,
|
(CURLoption)$a_opt,
|
||||||
(CURLoption)$a_data);
|
$a_data);
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
end
|
end
|
||||||
@@ -256,10 +262,10 @@ feature {NONE} -- C externals
|
|||||||
alias
|
alias
|
||||||
"[
|
"[
|
||||||
{
|
{
|
||||||
(FUNCTION_CAST(void, (CURL *, CURLoption, CURLoption)) $a_setopt_api)
|
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
|
||||||
((CURL *) $a_curl_handle,
|
((CURL *) $a_curl_handle,
|
||||||
(CURLoption)CURLOPT_WRITEFUNCTION,
|
(CURLoption)CURLOPT_WRITEFUNCTION,
|
||||||
(CURLoption)WriteMemoryCallback);
|
WriteMemoryCallback);
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
end
|
end
|
||||||
@@ -274,15 +280,15 @@ feature {NONE} -- C externals
|
|||||||
alias
|
alias
|
||||||
"[
|
"[
|
||||||
{
|
{
|
||||||
(FUNCTION_CAST(void, (CURL *, CURLoption, CURLoption)) $a_setopt_api)
|
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
|
||||||
((CURL *) $a_curl_handle,
|
((CURL *) $a_curl_handle,
|
||||||
(CURLoption)CURLOPT_DEBUGFUNCTION,
|
(CURLoption)CURLOPT_DEBUGFUNCTION,
|
||||||
(CURLoption)curl_trace);
|
curl_trace);
|
||||||
|
|
||||||
(FUNCTION_CAST(void, (CURL *, CURLoption, CURLoption)) $a_setopt_api)
|
(FUNCTION_CAST(void, (CURL *, CURLoption, ...)) $a_setopt_api)
|
||||||
((CURL *) $a_curl_handle,
|
((CURL *) $a_curl_handle,
|
||||||
(CURLoption)CURLOPT_VERBOSE,
|
(CURLoption)CURLOPT_VERBOSE,
|
||||||
(CURLoption)TRUE);
|
TRUE);
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -85,8 +85,14 @@ feature {NONE} -- Implementation
|
|||||||
not_void: Result /= Void
|
not_void: Result /= Void
|
||||||
end
|
end
|
||||||
|
|
||||||
module_name: STRING is "libcurl.dll"
|
module_name: STRING is
|
||||||
-- Module name.
|
-- Module name.
|
||||||
|
local
|
||||||
|
l_utility: CURL_UTILITY
|
||||||
|
once
|
||||||
|
create l_utility
|
||||||
|
Result := l_utility.module_name
|
||||||
|
end
|
||||||
|
|
||||||
internal_formadd_string_string (a_form: TYPED_POINTER [POINTER]; a_last_pointer: TYPED_POINTER [POINTER]; a_arg_1: INTEGER; a_arg_1_value: STRING_GENERAL; a_arg_2: INTEGER; a_arg_2_value: STRING_GENERAL; a_arg_3: INTEGER) is
|
internal_formadd_string_string (a_form: TYPED_POINTER [POINTER]; a_last_pointer: TYPED_POINTER [POINTER]; a_arg_1: INTEGER; a_arg_1_value: STRING_GENERAL; a_arg_2: INTEGER; a_arg_2_value: STRING_GENERAL; a_arg_3: INTEGER) is
|
||||||
-- Declared as curl_formadd ().
|
-- Declared as curl_formadd ().
|
||||||
|
|||||||
42
curl_utility.e
Normal file
42
curl_utility.e
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
indexing
|
||||||
|
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
|
||||||
|
|
||||||
|
module_name: STRING is
|
||||||
|
-- Module name.
|
||||||
|
local
|
||||||
|
l_platform: PLATFORM
|
||||||
|
once
|
||||||
|
create l_platform
|
||||||
|
if l_platform.is_windows then
|
||||||
|
Result := "libcurl.dll"
|
||||||
|
else
|
||||||
|
Result := "libcurl.so"
|
||||||
|
end
|
||||||
|
ensure
|
||||||
|
not_void: Result /= Void
|
||||||
|
end
|
||||||
|
|
||||||
|
indexing
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user