4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Stefan Bund <g0dil@berlios.de>
29 \brief Telnet inline non-template implementation */
31 //#include "Telnet.ih"
35 #define prefix_ inline
36 //-/////////////////////////////////////////////////////////////////////////////////////////////////
38 //-/////////////////////////////////////////////////////////////////////////////////////////////////
39 // senf::term::BaseTelnetProtocol::OptInfo
41 prefix_ senf::term::BaseTelnetProtocol::OptInfo::OptInfo()
42 : local (false), option (0u), wantState (DISABLED), optionState (NONE), enabled (false)
45 prefix_ senf::term::BaseTelnetProtocol::OptInfo::OptInfo(bool l, option_type o)
46 : local (l), option (o), wantState (DISABLED), optionState (NONE), enabled (false)
49 //-/////////////////////////////////////////////////////////////////////////////////////////////////
50 // senf::term::BaseTelnetProtocol::TelnetHandler
52 prefix_ senf::term::BaseTelnetProtocol::TelnetHandler::~TelnetHandler()
55 prefix_ std::string const & senf::term::telnethandler::TerminalType::terminalType()
61 //-/////////////////////////////////////////////////////////////////////////////////////////////////
62 // senf::term::telnethandler::NAWS
64 prefix_ unsigned senf::term::telnethandler::NAWS::width()
70 prefix_ unsigned senf::term::telnethandler::NAWS::height()
76 //-/////////////////////////////////////////////////////////////////////////////////////////////////
77 // senf::term::BaseTelnetProtocol
79 prefix_ senf::term::BaseTelnetProtocol::~BaseTelnetProtocol()
82 prefix_ senf::term::BaseTelnetProtocol::Handle senf::term::BaseTelnetProtocol::handle()
87 prefix_ void senf::term::BaseTelnetProtocol::incrementRequestCounter()
90 timeout_.timeout(scheduler::eventTime() + requestTimeout_);
93 prefix_ bool senf::term::BaseTelnetProtocol::requestsPending()
95 return pendingRequests_ > 0u;
98 prefix_ void senf::term::BaseTelnetProtocol::sendNOP()
104 prefix_ void senf::term::BaseTelnetProtocol::sendBRK()
110 prefix_ void senf::term::BaseTelnetProtocol::sendIP()
116 prefix_ void senf::term::BaseTelnetProtocol::sendAO()
122 prefix_ void senf::term::BaseTelnetProtocol::sendAYT()
128 prefix_ void senf::term::BaseTelnetProtocol::sendEC()
134 prefix_ void senf::term::BaseTelnetProtocol::sendEL()
140 prefix_ void senf::term::BaseTelnetProtocol::sendGA()
146 prefix_ void senf::term::BaseTelnetProtocol::requestLocalOption(option_type option,
149 request(getOption(true, option), enabled);
152 prefix_ void senf::term::BaseTelnetProtocol::acceptLocalOption(option_type option,
155 getOption(true, option).wantState = OptInfo::ACCEPTED;
158 prefix_ void senf::term::BaseTelnetProtocol::requestPeerOption(option_type option,
161 request(getOption(false, option), enabled);
164 prefix_ void senf::term::BaseTelnetProtocol::acceptPeerOption(option_type option,
167 getOption(false, option).wantState = OptInfo::ACCEPTED;
170 prefix_ bool senf::term::BaseTelnetProtocol::localOption(option_type option)
172 return getOption(true, option).enabled;
175 prefix_ bool senf::term::BaseTelnetProtocol::peerOption(option_type option)
177 return getOption(false, option).enabled;
180 prefix_ void senf::term::BaseTelnetProtocol::emit(char c)
185 //-/////////////////////////////////////////////////////////////////////////////////////////////////
192 // comment-column: 40
193 // c-file-style: "senf"
194 // indent-tabs-mode: nil
195 // ispell-local-dictionary: "american"
196 // compile-command: "scons -u test"