00001 // -*- C++ -*- 00002 // 00003 // $Id: FTP_ClientRequestHandler.inl 90924 2010-06-29 09:34:13Z mcorino $ 00004 00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 namespace ACE 00008 { 00009 namespace FTP 00010 { 00011 ACE_INLINE 00012 ClientRequestHandler::SessionHolder::session_type& ClientRequestHandler::SessionHolder::operator *() 00013 { 00014 return this->session_; 00015 } 00016 00017 ACE_INLINE 00018 ClientRequestHandler::SessionHolder::session_type* ClientRequestHandler::SessionHolder::operator -> () 00019 { 00020 return &this->session_; 00021 } 00022 00023 ACE_INLINE 00024 bool ClientRequestHandler::uses_passive_mode () const 00025 { 00026 return this->use_passive_mode_; 00027 } 00028 00029 ACE_INLINE 00030 void ClientRequestHandler::use_passive_mode () 00031 { 00032 this->use_passive_mode_ = true; 00033 } 00034 00035 ACE_INLINE 00036 void ClientRequestHandler::use_active_mode (u_short port) 00037 { 00038 this->use_passive_mode_ = false; 00039 this->active_port_ = port; 00040 } 00041 00042 ACE_INLINE 00043 u_short ClientRequestHandler::uses_active_port () const 00044 { 00045 return this->active_port_; 00046 } 00047 00048 00049 ACE_INLINE 00050 Request& ClientRequestHandler::request () 00051 { 00052 return this->request_; 00053 } 00054 00055 ACE_INLINE 00056 const Request& ClientRequestHandler::request () const 00057 { 00058 return this->request_; 00059 } 00060 00061 ACE_INLINE 00062 Response& ClientRequestHandler::response () 00063 { 00064 return this->response_; 00065 } 00066 00067 ACE_INLINE 00068 const Response& ClientRequestHandler::response () const 00069 { 00070 return this->response_; 00071 } 00072 00073 ACE_INLINE 00074 ClientRequestHandler::SessionHolder& ClientRequestHandler::session () 00075 { 00076 return *this->session_; 00077 } 00078 00079 ACE_INLINE 00080 void ClientRequestHandler::session (SessionHolder* session) 00081 { 00082 this->session_ = session; 00083 } 00084 00085 ACE_INLINE 00086 std::ostream& ClientRequestHandler::request_stream () 00087 { 00088 if (this->session_) 00089 return this->out_data_stream_; 00090 else 00091 return ACE::IOS::Null::out_stream_; 00092 } 00093 00094 ACE_INLINE 00095 std::istream& ClientRequestHandler::response_stream () 00096 { 00097 if (this->session_) 00098 return this->in_data_stream_; 00099 else 00100 return ACE::IOS::Null::in_stream_; 00101 } 00102 } 00103 } 00104 00105 ACE_END_VERSIONED_NAMESPACE_DECL