| AnyConnect Secure Mobility Client 5.1.10.233

MainDialog.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// MainDialog.h : header file
9//
10
11#pragma once
12
13#include <map>
14#include <list>
15#include <string>
16#include "GUIClientImpl.h"
17 class Gui;
18 class PromptDialog;
19
20 enum CustomMessage
21{
22 MF_NEWEVENT = WM_APP
23};
24
25/**
26 * MainDialog dialog
27 */
28 class MainDialog : public CDialog
29{
30// Construction
31 public:
32 MainDialog(Gui* pParent = NULL); // standard constructor
33
34 enum { IDD = IDD_EXAMPLE4_DIALOG };
35
36 CStatusBarCtrl *m_statusBar;
37 PromptDialog *m_promptDialog;
38 GUIClientImpl *m_pApiImpl;
39 ConnectPromptInfo *m_pPromptInfo;
40 std::list<tstring> m_promptNames;
41
42 void HandlePromptCB(ConnectPromptInfo &connectPrompt);
43 /**
44 * This method demonstrates the posting of an event once the API has
45 * indicated there is data available (see GUIClientImpl::EventAvailable).
46 *
47 * After the posted event fires, the method MainDialog::OnEventAvailable
48 * is called.
49 */
50 void HandleEventAvailable();
51
52 void showStatusbarText (const tstring &text);
53
54// Implementation
55 protected:
56 Gui *m_pParent;
57 tstring m_hostName;
58
59 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
60 virtual BOOL OnInitDialog();
61 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
62 afx_msg void OnCbnSelchangeCombo1();
63 afx_msg void OnBnClickedOk();
64 afx_msg void OnBnClickedCancel();
65 afx_msg void OnBnClickedDisconnect();
66
67 /**
68 * This method is invoked after the posted event from the method
69 * MainDialog::HandleEventAvailable fires.
70 *
71 * This method invokes the API method ClientIfc::ProcessEvents
72 * which in turn causes all pending events (NoticeCB,
73 * UserPromptCB, etc.) to be delivered.
74 */
75 LRESULT OnEventAvailable(WPARAM wparam, LPARAM lparam);
76
77 DECLARE_MESSAGE_MAP()
78};
tstring
#define tstring
Definition api.h:35
CDialog
ConnectPromptInfo
Definition ConnectPromptInfo.h:38
GUIClientImpl
Definition GUIClientImpl.h:23
Gui
Definition Gui.h:21
MainDialog::HandleEventAvailable
void HandleEventAvailable()
Definition MainDialog.cpp:113
MainDialog::OnEventAvailable
LRESULT OnEventAvailable(WPARAM wparam, LPARAM lparam)
Definition MainDialog.cpp:78
PromptDialog
Definition PromptDialog.h:15