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