indexing
description: "FTP protocol"
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2006-01-22 18:25:44 -0800 (Sun, 22 Jan 2006) $"
revision: "$Revision: 56675 $"
class interface
FTP_PROTOCOL
create
make (addr: like address)
DATA_RESOURCE
require DATA_RESOURCE
address_exists: addr /= Void
ensure DATA_RESOURCE
address_set: address = addr
feature
address: FTP_URL
bytes_transferred: INTEGER_32
NETWORK_RESOURCE
check_instruction: INTEGER_32 is 7
EXCEP_CONST
class_invariant: INTEGER_32 is 6
EXCEP_CONST
com_exception: INTEGER_32 is 28
EXCEP_CONST
create_on_deferred: INTEGER_32 is 17
EXCEP_CONST
developer_exception: INTEGER_32 is 24
EXCEP_CONST
dollar_applied_to_melted_feature: INTEGER_32 is 26
EXCEP_CONST
eiffel_runtime_fatal_error: INTEGER_32 is 25
EXCEP_CONST
eiffel_runtime_panic: INTEGER_32 is 13
EXCEP_CONST
exception_in_signal_handler: INTEGER_32 is 20
EXCEP_CONST
external_exception: INTEGER_32 is 18
`errno'
EXCEP_CONST
floating_point_exception: INTEGER_32 is 5
EXCEP_CONST
generating_type: STRING_8
ANY
generator: STRING_8
ANY
hash_code: INTEGER_32
DATA_RESOURCE
ensure HASHABLE
good_hash_value: Result >= 0
incorrect_inspect_value: INTEGER_32 is 9
EXCEP_CONST
io_exception: INTEGER_32 is 21
EXCEP_CONST
last_packet: STRING_8
DATA_RESOURCE
last_packet_size: INTEGER_32
NETWORK_RESOURCE
location: STRING_8
DATA_RESOURCE
require DATA_RESOURCE
address_exists: address /= Void
loop_invariant: INTEGER_32 is 11
EXCEP_CONST
loop_variant: INTEGER_32 is 10
EXCEP_CONST
mode: INTEGER_32
DATA_RESOURCE
no_more_memory: INTEGER_32 is 2
EXCEP_CONST
number_of_codes: INTEGER_32 is 29
EXCEP_CONST
operating_system_exception: INTEGER_32 is 22
`errno'
EXCEP_CONST
out_of_memory: INTEGER_32 is 15
EXCEP_CONST
port: INTEGER_32
DATA_RESOURCE
ensure DATA_RESOURCE
result_non_negative: Result >= 0
postcondition: INTEGER_32 is 4
EXCEP_CONST
precondition: INTEGER_32 is 3
EXCEP_CONST
proxy_host: STRING_8
DATA_RESOURCE
require DATA_RESOURCE
proxy_supported: is_proxy_supported
proxy_used: is_proxy_used
ensure DATA_RESOURCE
result_not_empty: Result /= Void and then not Result.is_empty
proxy_port: INTEGER_32
DATA_RESOURCE
require DATA_RESOURCE
proxy_supported: is_proxy_supported
proxy_used: is_proxy_used
ensure DATA_RESOURCE
result_non_negative: Result >= 0
read_buffer_size: INTEGER_32
NETWORK_RESOURCE
rescue_exception: INTEGER_32 is 14
EXCEP_CONST
resumption_failed: INTEGER_32 is 16
EXCEP_CONST
retrieve_exception: INTEGER_32 is 23
`retrieved'`IO_MEDIUM'
EXCEP_CONST
routine_failure: INTEGER_32 is 8
EXCEP_CONST
runtime_check_exception: INTEGER_32 is 29
EXCEP_CONST
runtime_io_exception: INTEGER_32 is 27
EXCEP_CONST
service: STRING_8
DATA_RESOURCE
signal_exception: INTEGER_32 is 12
EXCEP_CONST
valid_code (c: INTEGER_32): BOOLEAN
`c'
EXCEP_CONST
void_assigned_to_expanded: INTEGER_32 is 19
EXCEP_CONST
void_call_target: INTEGER_32 is 1
EXCEP_CONST
feature
count: INTEGER_32
default_buffer_size: INTEGER_32 is 16384
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
shallow_implies_deep: standard_equal (some, other) implies Result
both_or_none_void: (some = Void) implies (Result = (other = Void))
same_type: (Result and (some /= Void)) implies some.same_type (other)
symmetric: Result implies deep_equal (other, some)
frozen equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))
is_equal (other: like Current): BOOLEAN
`other'
DATA_RESOURCE
require ANY
other_not_void: other /= Void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))
frozen standard_is_equal (other: like Current): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
feature
address_exists: BOOLEAN
NETWORK_RESOURCE
assertion_violation: BOOLEAN
EXCEPTIONS
class_name: STRING_8
EXCEPTIONS
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
developer_exception_name: STRING_8
EXCEPTIONS
require EXCEPTIONS
applicable: is_developer_exception
error: BOOLEAN
DATA_RESOURCE
error_code: INTEGER_32
DATA_RESOURCE
error_text (code: INTEGER_32): STRING_8
DATA_RESOURCE_ERROR_CONSTANTS
require DATA_RESOURCE_ERROR_CONSTANTS
positive_code: code > 0
exception: INTEGER_32
EXCEPTIONS
exception_trace: STRING_8
EXCEPTIONS
has_packet: BOOLEAN
last_packet
DATA_RESOURCE
is_binary_mode: BOOLEAN
is_count_valid: BOOLEAN
count
NETWORK_RESOURCE
is_developer_exception: BOOLEAN
EXCEPTIONS
is_developer_exception_of_name (name: STRING_8): BOOLEAN
`name'
EXCEPTIONS
is_hashable: BOOLEAN
DATA_RESOURCE
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
is_logged_in: BOOLEAN
is_mode_set: BOOLEAN
DATA_RESOURCE
is_open: BOOLEAN
require DATA_RESOURCE
True
is_packet_pending: BOOLEAN
NETWORK_RESOURCE
is_proxy_supported: BOOLEAN
DATA_RESOURCE
is_proxy_used: BOOLEAN
NETWORK_RESOURCE
is_readable: BOOLEAN
NETWORK_RESOURCE
ensure DATA_RESOURCE
mode_unchanged: mode = old mode
is_signal: BOOLEAN
EXCEPTIONS
is_system_exception: BOOLEAN
EXCEPTIONS
is_writable: BOOLEAN
NETWORK_RESOURCE
ensure DATA_RESOURCE
mode_unchanged: mode = old mode
meaning (except: INTEGER_32): STRING_8
`except'
EXCEPTIONS
original_class_name: STRING_8
EXCEPTIONS
original_exception: INTEGER_32
EXCEPTIONS
original_recipient_name: STRING_8
EXCEPTIONS
original_tag_name: STRING_8
EXCEPTIONS
passive_mode: BOOLEAN
read_mode: BOOLEAN
recipient_name: STRING_8
EXCEPTIONS
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
supports_multiple_transactions: BOOLEAN is True
tag_name: STRING_8
EXCEPTIONS
timeout: INTEGER_32
DATA_RESOURCE
transfer_initiated: BOOLEAN
DATA_RESOURCE
valid_mode (n: INTEGER_32): BOOLEAN
`n'
write_mode: BOOLEAN
feature
catch (code: INTEGER_32)
`code'
EXCEPTIONS
close
require DATA_RESOURCE
open: is_open
ensure DATA_RESOURCE
closed: not is_open
mode_unchanged: mode = old mode
no_packet_available: not (has_packet and is_packet_pending)
ensure then
not_logged_in: not is_logged_in
die (code: INTEGER_32)
`code'
EXCEPTIONS
ignore (code: INTEGER_32)
`code'
EXCEPTIONS
initiate_transfer
require DATA_RESOURCE
no_error_occurred: not error
mode_set: is_mode_set
open: is_open
not_initiated: not transfer_initiated
ensure DATA_RESOURCE
failure_means_error: not transfer_initiated implies error
ensure then
connection_established: data_socket.is_open_read or data_socket.is_open_write
message_on_failure
EXCEPTIONS
no_message_on_failure
EXCEPTIONS
open
require DATA_RESOURCE
no_error_occurred: not error
mode_set: is_mode_set
ensure DATA_RESOURCE
no_packet_available: not (has_packet and is_packet_pending)
initiated_flag_reset: not transfer_initiated
failure_means_error: not is_open implies error
raise (name: STRING_8)
`name'
EXCEPTIONS
raise_retrieval_exception (name: STRING_8)
`name'
EXCEPTIONS
reset_error
DATA_RESOURCE
ensure DATA_RESOURCE
error_reset: not error
reset_proxy
DATA_RESOURCE
ensure DATA_RESOURCE
proxy_reset: not address.is_proxy_used
reuse_connection (other: DATA_RESOURCE)
`other'
require DATA_RESOURCE
other_exists: other /= Void
same_type: same_type (other)
supports_multiple_transactions: supports_multiple_transactions and other.supports_multiple_transactions
other_opened: other.is_open
set_active_mode
ensure
active_mode_set: not passive_mode
set_binary_mode
ensure
binary_mode_set: is_binary_mode
set_passive_mode
ensure
passive_mode_set: passive_mode
set_password (pw: STRING_8)
`pw'
DATA_RESOURCE
require DATA_RESOURCE
password_accepted: address.is_password_accepted
non_empty_password: pw /= Void and then not pw.is_empty
set_port (port_no: INTEGER_32)
`port_no'
DATA_RESOURCE
require DATA_RESOURCE
closed: not is_open
non_negative_port_number: port_no >= 0
ensure DATA_RESOURCE
port_set: port = port_no
set_proxy (host: STRING_8; port_no: INTEGER_32)
`host'`port_no'
DATA_RESOURCE
require DATA_RESOURCE
proxy_supported: is_proxy_supported
closed: not is_open
non_empty_host: host /= Void and then not host.is_empty
host_ok: address.proxy_host_ok (host)
non_negative_port: port_no >= 0
ensure DATA_RESOURCE
proxy_set: address.is_proxy_used
set_proxy_information (pi: PROXY_INFORMATION)
`pi'
DATA_RESOURCE
require DATA_RESOURCE
proxy_supported: is_proxy_supported
ensure DATA_RESOURCE
proxy_set: address.is_proxy_used
set_read_buffer_size (n: INTEGER_32)
NETWORK_RESOURCE
require DATA_RESOURCE
size_positive: n > 0
ensure DATA_RESOURCE
buffer_size_set: read_buffer_size = n
set_read_mode
ensure DATA_RESOURCE
read_mode_set: read_mode
set_text_mode
ensure
text_mode_set: not is_binary_mode
set_timeout (n: INTEGER_32)
`n'
DATA_RESOURCE
require DATA_RESOURCE
non_negative: n >= 0
ensure DATA_RESOURCE
timeout_set: timeout = n
set_username (un: STRING_8)
`un'
DATA_RESOURCE
require DATA_RESOURCE
username_accepted: address.has_username
non_empty_username: un /= Void and then not un.is_empty
set_write_mode
ensure DATA_RESOURCE
write_mode_set: write_mode
feature
dispose
DATA_RESOURCE
feature
copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature
read
require DATA_RESOURCE
no_error_occurred: not error
open: is_open
transfer_initated: transfer_initiated
readable: is_readable
positive_read_buffer_size: read_buffer_size > 0
packet_pending: is_packet_pending
ensure DATA_RESOURCE
packet_received: is_packet_pending implies last_packet_size > 0
counter_correct: not error implies bytes_transferred = old bytes_transferred + last_packet_size
feature
io: STD_FILES
ANY
out: STRING_8
ANYtagged_out
ANY
print (some: ANY)
`some'
ANY
put (other: DATA_RESOURCE)
`other'
require DATA_RESOURCE
no_error_occurred: not (error and other.error)
other_resource_exists: other /= Void
resources_open: is_open and other.is_open
writable: is_writable
transfer_initated: transfer_initiated
frozen tagged_out: STRING_8
ANYout
ANY
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
invariant
DATA_RESOURCE
address_assigned: address /= Void
timeout_non_negative: timeout >= 0
packet_constraint: not (has_packet xor last_packet /= Void)
pending_constraint: is_packet_pending implies (is_open and is_readable and transfer_initiated)
error_definition: error = (error_code /= 0)
valid_count_constraint: count > 0 implies is_count_valid
mode_constraint: is_mode_set = read_mode xor write_mode
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
indexing
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 FTP_PROTOCOL