AnyConnect Secure Mobility Client
5.1.10.233
GUIClientImpl.h
1
/******************************************************************************\
2
* This sample is supplied as is with no implied warranty.
3
* It is designed to assist you in using the Cisco AnyConnect VPN API.
4
* It is assumed that you will build a production application and
5
* refer to this sample as a reference only.
6
\*****************************************************************************/
7
8
#ifndef _GUICLIENTIMPL_
9
#define _GUICLIENTIMPL_
10
11
#include "ClientIfc.h"
12
13
enum
RequestType { REQ_CONNECT, REQ_GROUPLIST, REQ_END };
14
15
class
MainDialog
;
16
17
/**
18
* This is an example application demonstrating the implementation of the
19
* AnyConnect API
20
*/
21
22
class
GUIClientImpl :
public
ClientIfc
23
{
24
public
:
25
26
GUIClientImpl(
MainDialog
*parent );
27
virtual
~GUIClientImpl();
28
29
bool
connect(
tstring
host);
30
31
tstring
ms_user,
32
ms_pswd,
33
ms_group;
34
35
void
setUserData(
ConnectPromptInfo
&ConnectPrompt);
36
37
protected
:
38
39
ConnectPromptInfo
*m_pConnectPrompt;
40
MainDialog
*parentWindow;
41
42
void
StatsCB(IN
VPNStats
&stats);
43
44
void
StateCB(IN
const
VPNState
state,
45
IN
const
VPNSubState
subState,
46
IN
const
tstring
stateString);
47
48
void
BannerCB(IN
const
tstring
&banner);
49
50
void
PreConnectReminderCB
(
const
tstring
&rtstrPreConnectReminder);
51
52
void
NoticeCB(IN
const
tstring
¬ice,
53
IN
const
MessageType
type,
54
IN
const
bool
bSensitive =
false
);
55
56
void
ExitNoticeCB(IN
const
tstring
¬ice,
const
int
returnCode);
57
58
void
ServiceReadyCB
();
59
60
void
UserPromptCB(IN
ConnectPromptInfo
&ConnectPrompt);
61
62
void
CertBlockedCB(IN
const
tstring
&rtstrUntrustedServer);
63
void
CertWarningCB(IN
const
tstring
&rtstrUntrustedServer,
64
IN
const
std::list<tstring> &rltstrCertErrors,
65
IN
bool
bAllowImport);
66
67
/**
68
* The implementation of this method and subsequent call on
69
* MainDialog::HandleEventAvailable demonstrates the posting of
70
* an event.
71
*/
72
void
EventAvailable
();
73
74
75
private
:
76
77
RequestType me_RequestType;
78
79
};
80
81
82
#endif
// _GUICLIENTIMPL_
VPNSubState
VPNSubState
Definition
api.h:169
MessageType
MessageType
Definition
api.h:109
tstring
#define tstring
Definition
api.h:35
VPNState
VPNState
Definition
api.h:145
ConnectPromptInfo
Definition
ConnectPromptInfo.h:38
GUIClientImpl::PreConnectReminderCB
void PreConnectReminderCB(const tstring &rtstrPreConnectReminder)
Definition
GUIClientImpl.cpp:71
GUIClientImpl::EventAvailable
void EventAvailable()
Definition
GUIClientImpl.cpp:110
GUIClientImpl::ServiceReadyCB
void ServiceReadyCB()
Definition
GUIClientImpl.cpp:107
MainDialog
Definition
MainDialog.h:29
VPNStats
Definition
VPNStats.h:36
AnyConnect C++ API Documentation by
Cisco Systems