4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Telnet inline non-template implementation */
26 //#include "Telnet.ih"
30 #define prefix_ inline
31 ///////////////////////////////cci.p///////////////////////////////////////
33 ///////////////////////////////////////////////////////////////////////////
34 // senf::term::BaseTelnetProtocol::OptInfo
36 prefix_ senf::term::BaseTelnetProtocol::OptInfo::OptInfo()
37 : local (false), option (0u), wantState (DISABLED), optionState (NONE), enabled (false)
40 prefix_ senf::term::BaseTelnetProtocol::OptInfo::OptInfo(bool l, option_type o)
41 : local (l), option (o), wantState (DISABLED), optionState (NONE), enabled (false)
44 ///////////////////////////////////////////////////////////////////////////
45 // senf::term::BaseTelnetProtocol::TelnetHandler
47 prefix_ senf::term::BaseTelnetProtocol::TelnetHandler::~TelnetHandler()
50 prefix_ std::string const & senf::term::telnethandler::TerminalType::terminalType()
56 ///////////////////////////////////////////////////////////////////////////
57 // senf::term::telnethandler::NAWS
59 prefix_ unsigned senf::term::telnethandler::NAWS::width()
65 prefix_ unsigned senf::term::telnethandler::NAWS::height()
71 ///////////////////////////////////////////////////////////////////////////
72 // senf::term::BaseTelnetProtocol
74 prefix_ senf::term::BaseTelnetProtocol::~BaseTelnetProtocol()
77 prefix_ senf::term::BaseTelnetProtocol::Handle senf::term::BaseTelnetProtocol::handle()
82 prefix_ void senf::term::BaseTelnetProtocol::incrementRequestCounter()
85 timeout_.timeout(senf::scheduler::eventTime() + requestTimeout_);
88 prefix_ bool senf::term::BaseTelnetProtocol::requestsPending()
90 return pendingRequests_ > 0u;
93 prefix_ void senf::term::BaseTelnetProtocol::sendNOP()
99 prefix_ void senf::term::BaseTelnetProtocol::sendBRK()
105 prefix_ void senf::term::BaseTelnetProtocol::sendIP()
111 prefix_ void senf::term::BaseTelnetProtocol::sendAO()
117 prefix_ void senf::term::BaseTelnetProtocol::sendAYT()
123 prefix_ void senf::term::BaseTelnetProtocol::sendEC()
129 prefix_ void senf::term::BaseTelnetProtocol::sendEL()
135 prefix_ void senf::term::BaseTelnetProtocol::sendGA()
141 prefix_ void senf::term::BaseTelnetProtocol::requestLocalOption(option_type option,
144 request(getOption(true, option), enabled);
147 prefix_ void senf::term::BaseTelnetProtocol::acceptLocalOption(option_type option,
150 getOption(true, option).wantState = OptInfo::ACCEPTED;
153 prefix_ void senf::term::BaseTelnetProtocol::requestPeerOption(option_type option,
156 request(getOption(false, option), enabled);
159 prefix_ void senf::term::BaseTelnetProtocol::acceptPeerOption(option_type option,
162 getOption(false, option).wantState = OptInfo::ACCEPTED;
165 prefix_ bool senf::term::BaseTelnetProtocol::localOption(option_type option)
167 return getOption(true, option).enabled;
170 prefix_ bool senf::term::BaseTelnetProtocol::peerOption(option_type option)
172 return getOption(false, option).enabled;
175 prefix_ void senf::term::BaseTelnetProtocol::emit(char c)
180 ///////////////////////////////cci.e///////////////////////////////////////
187 // comment-column: 40
188 // c-file-style: "senf"
189 // indent-tabs-mode: nil
190 // ispell-local-dictionary: "american"
191 // compile-command: "scons -u test"