1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Secure connections test application |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TLSCONNECTIONAPP_H |
|
19 #define TLSCONNECTIONAPP_H |
|
20 |
|
21 #include <hbapplication.h> |
|
22 #include "tlsconnectionobserver.h" |
|
23 |
|
24 class HbMainWindow; |
|
25 class HbView; |
|
26 class HbComboBox; |
|
27 class HbLineEdit; |
|
28 class HbLabel; |
|
29 class CTlsConnection; |
|
30 |
|
31 |
|
32 class TlsConnectionApplication : public HbApplication, public MTlsConnectionObserver |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: // constructor and destructor |
|
37 TlsConnectionApplication(int& aArgc, char* aArgv[]); |
|
38 virtual ~TlsConnectionApplication(); |
|
39 |
|
40 public: // from MTlsConnectionObserver |
|
41 void HandleNetworkEvent(TTlsConnectionState aEvent, TInt aError); |
|
42 void HandleTransferData(const TDesC8& aData, TInt aLength); |
|
43 |
|
44 private slots: |
|
45 void runTestPressed(); |
|
46 void addHostName(); |
|
47 |
|
48 private: // new functions |
|
49 void showProgress(const QString& aStep, int aError); |
|
50 TInt getInt(const QString& aString, int defaultValue); |
|
51 |
|
52 private: // data |
|
53 HbMainWindow *mMainWindow; |
|
54 HbView *mMainView; |
|
55 HbComboBox *mHost; |
|
56 HbLineEdit *mPort; |
|
57 HbLineEdit *mOpeningDelay; |
|
58 HbLabel *mStatusLabel; |
|
59 CTlsConnection *mConnection; |
|
60 }; |
|
61 |
|
62 #endif // TLSCONNECTIONAPP_H |
|
63 |
|