src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogsession_p.h
changeset 0 16d8024aca5e
child 3 11d3954df52a
equal deleted inserted replaced
-1:000000000000 0:16d8024aca5e
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (developer.feedback@nokia.com)
       
     6 **
       
     7 ** This file is part of the HbCore module of the UI Extensions for Mobile.
       
     8 **
       
     9 ** GNU Lesser General Public License Usage
       
    10 ** This file may be used under the terms of the GNU Lesser General Public
       
    11 ** License version 2.1 as published by the Free Software Foundation and
       
    12 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
       
    13 ** Please review the following information to ensure the GNU Lesser General
       
    14 ** Public License version 2.1 requirements will be met:
       
    15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    16 **
       
    17 ** In addition, as a special exception, Nokia gives you certain additional
       
    18 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    20 **
       
    21 ** If you have questions regarding the use of this file, please contact
       
    22 ** Nokia at developer.feedback@nokia.com.
       
    23 **
       
    24 ****************************************************************************/
       
    25 
       
    26 #ifndef HBDEVICEDIALOGSESSION_P_H
       
    27 #define HBDEVICEDIALOGSESSION_P_H
       
    28 
       
    29 #include <e32base.h>
       
    30 #include <QObject>
       
    31 #include <QVariantMap>
       
    32 #include <QList>
       
    33 #include <QString>
       
    34 
       
    35 class HbDeviceDialogServerPrivate;
       
    36 class HbIndicatorSessionHandler;
       
    37 
       
    38 class HbDeviceDialogSession : public CSession2
       
    39     {
       
    40     friend class HbIndicatorSessionHandler;
       
    41 public: // Construction and destruction
       
    42 
       
    43     static HbDeviceDialogSession *NewL();
       
    44     ~HbDeviceDialogSession();
       
    45 
       
    46 public:
       
    47 
       
    48     virtual void CreateL();
       
    49     void ServiceL( const RMessage2 &aMessage );
       
    50     void DispatchMessageL( const RMessage2 &aMessage );
       
    51 
       
    52     TInt DeviceDialogIdentifier() const;
       
    53     void DeviceDialogUpdate( const QVariantMap &parameters );
       
    54     void DeviceDialogClosed( TInt identifier, TInt closeReason );
       
    55 
       
    56 private:
       
    57 
       
    58     HbDeviceDialogServerPrivate& Server();
       
    59     virtual void Disconnect( const RMessage2 &aMessage );
       
    60 
       
    61     void ShowDeviceDialogL( const RMessage2 &aMessage );
       
    62     void UpdateDeviceDialogL( const RMessage2 &aMessage );
       
    63     void CancelDeviceDialog( const RMessage2 &aMessage);
       
    64     void ClientClosing( const RMessage2 &aMessage );
       
    65     void CancelRequest( const RMessage2 &aMessage );
       
    66     void UpdateChannelRequestL( const RMessage2 &aMessage );
       
    67     void UpdateDataRequestL( const RMessage2 &aMessage );
       
    68     void CancelUpdateChannel(const RMessage2 aMessage);
       
    69     void WriteUpdateData(const QVariantMap &parameters, int deviceDialogId);
       
    70     int WriteCloseData(int deviceDialogId, int closeReason);
       
    71     QString indicatorTypeFromMessageL(const RMessage2 &aMessage) const;
       
    72     HbDeviceDialogSession();
       
    73 
       
    74 private:
       
    75     bool iKeepAfterClose;
       
    76     int iWriteCloseId;
       
    77     int iWriteCloseReason;
       
    78     RMessage2 iUpdateChannel;
       
    79     QList<QVariantMap> mEventList;
       
    80     QList<int> mIdList;
       
    81     TBool iUpdateChannelOpen;
       
    82     HbIndicatorSessionHandler *iIndicatorSessionHandler;
       
    83 };
       
    84 
       
    85 #endif  // HBDEVICEDIALOGSESSION_P_H
       
    86