wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapper.h
author hgs
Thu, 24 Jun 2010 10:49:51 +0300
changeset 39 7b3e49e4608a
parent 31 e8f4211554fb
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
31
hgs
parents: 19
diff changeset
     2
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:
31
hgs
parents: 19
diff changeset
    15
* Wrapper for Symbian Connection Monitor library.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#ifndef WLANQTUTILSCONMONWRAPPER_H
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#define WLANQTUTILSCONMONWRAPPER_H
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
31
hgs
parents: 19
diff changeset
    21
// System includes
hgs
parents: 19
diff changeset
    22
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include <QObject>
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include <QList>
31
hgs
parents: 19
diff changeset
    25
#include <QSharedPointer>
hgs
parents: 19
diff changeset
    26
#include <QScopedPointer>
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
31
hgs
parents: 19
diff changeset
    28
// User includes
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
31
hgs
parents: 19
diff changeset
    30
#include "wlanqtutils.h"
hgs
parents: 19
diff changeset
    31
hgs
parents: 19
diff changeset
    32
// Forward declarations
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
31
hgs
parents: 19
diff changeset
    34
class WlanQtUtilsAp;
hgs
parents: 19
diff changeset
    35
class WlanQtUtilsConnection;
hgs
parents: 19
diff changeset
    36
class WlanQtUtilsConMonWrapperInfo;
hgs
parents: 19
diff changeset
    37
class WlanQtUtilsConMonWrapperDisconnect;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
31
hgs
parents: 19
diff changeset
    39
// External data types
hgs
parents: 19
diff changeset
    40
hgs
parents: 19
diff changeset
    41
// Constants
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
31
hgs
parents: 19
diff changeset
    43
// Class declaration
hgs
parents: 19
diff changeset
    44
hgs
parents: 19
diff changeset
    45
class WlanQtUtilsConMonWrapper : public QObject
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
{
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
    Q_OBJECT
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
    
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
public:
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
31
hgs
parents: 19
diff changeset
    51
    // Data types
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
39
hgs
parents: 31
diff changeset
    53
    explicit WlanQtUtilsConMonWrapper(QObject *parent = 0);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
    
31
hgs
parents: 19
diff changeset
    55
    ~WlanQtUtilsConMonWrapper();
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
31
hgs
parents: 19
diff changeset
    57
    WlanQtUtilsConnection *activeConnection() const;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
31
hgs
parents: 19
diff changeset
    59
    WlanQtUtilsConnection *connectionInfo(uint connectionId) const;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
    void disconnectIap(int iapId);
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
        
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
signals:
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
31
hgs
parents: 19
diff changeset
    65
    /*!
hgs
parents: 19
diff changeset
    66
       Signal indicating that a new connection has been created.
hgs
parents: 19
diff changeset
    67
hgs
parents: 19
diff changeset
    68
       @param [in] connectionId Connection ID.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
     */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
    void connCreatedEventFromWrapper(uint connectionId);
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
31
hgs
parents: 19
diff changeset
    72
    /*!
hgs
parents: 19
diff changeset
    73
       Signal indicating that a connection has been deleted.
hgs
parents: 19
diff changeset
    74
hgs
parents: 19
diff changeset
    75
       @param [in] connectionId Connection ID.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
     */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
    void connDeletedEventFromWrapper(uint connectionId);
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
31
hgs
parents: 19
diff changeset
    79
    /*!
hgs
parents: 19
diff changeset
    80
       Signal indicating that status of a connection has changed.
hgs
parents: 19
diff changeset
    81
hgs
parents: 19
diff changeset
    82
       @param [in] connectionId Connection ID.
hgs
parents: 19
diff changeset
    83
       @param [in] connectionStatus Connection status.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
     */
31
hgs
parents: 19
diff changeset
    85
    void connStatusEventFromWrapper(
hgs
parents: 19
diff changeset
    86
        uint connectionId,
hgs
parents: 19
diff changeset
    87
        WlanQtUtils::ConnStatus connectionStatus);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
31
hgs
parents: 19
diff changeset
    89
public slots:
hgs
parents: 19
diff changeset
    90
hgs
parents: 19
diff changeset
    91
protected:
hgs
parents: 19
diff changeset
    92
hgs
parents: 19
diff changeset
    93
protected slots:
hgs
parents: 19
diff changeset
    94
hgs
parents: 19
diff changeset
    95
private:
hgs
parents: 19
diff changeset
    96
hgs
parents: 19
diff changeset
    97
private slots:
hgs
parents: 19
diff changeset
    98
hgs
parents: 19
diff changeset
    99
private: // data
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
    
31
hgs
parents: 19
diff changeset
   101
    // Owned data
hgs
parents: 19
diff changeset
   102
    
hgs
parents: 19
diff changeset
   103
    //! Private implementation of connection info interface
hgs
parents: 19
diff changeset
   104
    QScopedPointer<WlanQtUtilsConMonWrapperInfo> d_ptrInfo;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
31
hgs
parents: 19
diff changeset
   106
    //! Private implementation of connection disconnect interface
hgs
parents: 19
diff changeset
   107
    QScopedPointer<WlanQtUtilsConMonWrapperDisconnect> d_ptrDisconnect;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
31
hgs
parents: 19
diff changeset
   109
    // Friend classes
hgs
parents: 19
diff changeset
   110
    
39
hgs
parents: 31
diff changeset
   111
    // Friend classes in order to be able to emit public signals directly
hgs
parents: 31
diff changeset
   112
    // from private implementation classes.
31
hgs
parents: 19
diff changeset
   113
    friend class WlanQtUtilsConMonWrapperInfo;
hgs
parents: 19
diff changeset
   114
    
hgs
parents: 19
diff changeset
   115
    // This is defined as a friend class in order to be able to call
hgs
parents: 19
diff changeset
   116
    // event handlers of wrappers from unit tests.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
    friend class TestWlanQtUtils;
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   118
};
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
31
hgs
parents: 19
diff changeset
   120
#endif // WLANQTUTILSCONMONWRAPPER_H