1
#if !defined(Dragon_Telnet_Client_hxx)
2
#define Dragon_Telnet_Client_hxx
4
#include <Netxx/Stream.h>
5
#include <Netxx/Timeout.h>
7
#include "rutil/Data.hxx"
12
TelnetClient(const resip::Data& server);
13
virtual ~TelnetClient();
17
void expect(const resip::Data& expects);
19
void send(const resip::Data& data, bool newline=true);
22
Netxx::Stream mClient;
26
class Cisco7960Client : public TelnetClient
29
// login, open a test session
30
Cisco7960Client(const resip::Data& server, const resip::Data& password);
34
void selectLine(int lineNumber);
35
void soft(int key, int repeat = 1);
36
void provisionLine(int lineNumber,
37
const resip::Data& name,
38
const resip::Data& authName,
39
const resip::Data& authPass,
40
const resip::Data& proxy,
42
void dial(const resip::Data& number);
43
void selectAndDial(int lineNumber, const resip::Data& number);
44
void registerLine(int lineNumber);
45
void unregisterLine(int lineNumber);
46
void reset(); // reboots
47
void reload(); // reloads configuration
52
// Copyright 2005 Purplecomm, Inc.
54
Copyright (c) 2005, PurpleComm, Inc.
57
Redistribution and use in source and binary forms, with or without modification,
58
are permitted provided that the following conditions are met:
60
* Redistributions of source code must retain the above copyright notice, this
61
list of conditions and the following disclaimer.
62
* Redistributions in binary form must reproduce the above copyright notice,
63
this list of conditions and the following disclaimer in the documentation
64
and/or other materials provided with the distribution.
65
* Neither the name of PurpleComm, Inc. nor the names of its contributors may
66
be used to endorse or promote products derived from this software without
67
specific prior written permission.
69
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
70
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
71
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
72
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
73
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
74
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
75
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
76
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
77
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
78
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.