wvuing/IMPSConnectionUI/UISrc/CCnUiClientGroupUiNotifyHandler.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Client group remote notify handler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CCNUICLIENTGROUPUINOTIFYHANDLER_H
       
    21 #define __CCNUICLIENTGROUPUINOTIFYHANDLER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <E32Base.h>
       
    25 #include <impspresenceconnectionuiconstsng.h>
       
    26 #include "MCnUiConnQueryObserver.h"
       
    27 #include "CCnUiGroupChannel.h"
       
    28 
       
    29 
       
    30 //FORWARD DECLARATION
       
    31 class MCnUiUiFacade;
       
    32 class MCnUiConnQuery;
       
    33 
       
    34 
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38  * Client group remote notify handler.
       
    39  *
       
    40  * Handles client group remote UI notifications.
       
    41  * (Used as client side pair to CCnUiClientGroupUiNotifyMediator)
       
    42  *
       
    43  * @since 2.1
       
    44  */
       
    45 NONSHARABLE_CLASS( CCnUiClientGroupUiNotifyHandler ) : public CBase,
       
    46         public MCnUiGroupChannelListener,
       
    47         public MCnUiConnQueryObserver
       
    48     {
       
    49 public:  // Two-phased constructors and destructor
       
    50 
       
    51     /**
       
    52      * Two-phased constructor, constructs the
       
    53      * CCnUiClientGroupUiNotifyHandler object.
       
    54      *
       
    55      * @since 2.1
       
    56      * @param aClient The client.
       
    57      * @param aUi The UI to use.
       
    58      * @return is pointer to CCnUiClientGroupUiNotifyHandler object.
       
    59      */
       
    60     static CCnUiClientGroupUiNotifyHandler* NewL( TIMPSConnectionClient aClient );
       
    61 
       
    62     /**
       
    63      * Destructor.
       
    64      */
       
    65     virtual ~CCnUiClientGroupUiNotifyHandler();
       
    66 
       
    67 
       
    68 private: //Constructors
       
    69 
       
    70     /**
       
    71      * C++ default constructor.
       
    72      */
       
    73     CCnUiClientGroupUiNotifyHandler( TIMPSConnectionClient aClient );
       
    74 
       
    75     /**
       
    76      * By default Symbian 2nd phase constructor is private.
       
    77      */
       
    78     void ConstructL();
       
    79 
       
    80 
       
    81 public: //New methods
       
    82 
       
    83     /**
       
    84      * Checks is certain remote UI message handled.
       
    85      *
       
    86      * @since 2.1
       
    87      * @param Remote message to check. (See CnUiCommon.hrh
       
    88      * for remote messages.)
       
    89      * @param ETrue if remote message is handled. Else EFalse.
       
    90      */
       
    91     TBool Handled( TInt aRemoteUiMessage );
       
    92 
       
    93 
       
    94     /**
       
    95      * Sets certain remote UI message handling status.
       
    96      *
       
    97      *
       
    98      * @since 2.1
       
    99      * @param Remote message to set. (See CnUiCommon.hrh
       
   100      * for remote messages.)
       
   101      * @param aHandled ETrue if message should be handled.
       
   102      * EFalse if message handling should be stopped.
       
   103      * By default all known message handlings are stopped.
       
   104      * If not supported message type is tried to enable / disable,
       
   105      * does nothing.
       
   106      */
       
   107     void SetHandled( TInt aRemoteUiMessage, TBool aHandled );
       
   108 
       
   109 
       
   110     /**
       
   111      * Notifies from presence event.
       
   112      *
       
   113      * @since 2.1
       
   114      * @param aEvent The presence event.
       
   115      */
       
   116     void HandlePresenceEventL( TIMPSPresenceServiceEvent aEvent );
       
   117 
       
   118     /**
       
   119      * Sets the new resource file to use in Connection UI.
       
   120      *
       
   121      * @param aNewResourceFile the new resourcefile to be used
       
   122      * @since 2.6
       
   123      */
       
   124     void UseResourceFileL( const TDesC& aNewResourceFile );
       
   125 
       
   126 public: //from MCnUiGroupChannelListener
       
   127 
       
   128     /**
       
   129      * Callback method for channel events.
       
   130      *
       
   131      * @since 2.1
       
   132      * @param aGroupId    The originating channel group.
       
   133      * @param aChannelId  The originating channel.
       
   134      * @param aChannelMsg The channel message.
       
   135      */
       
   136     void HandleChannelMsg( TInt aGroupId,
       
   137                            TGCChannelID aChannelId,
       
   138                            TInt aChannelMsg );
       
   139 
       
   140 public: //from MCnUiConnQueryObserver
       
   141 
       
   142     /**
       
   143      * Notify method for confirmation query result.
       
   144      * @since 2.1
       
   145      */
       
   146     void HandleQueryResult( TBool aQueryAccepted );
       
   147 
       
   148 
       
   149 private: //helpers
       
   150     void ReportQueryResultL( TBool aQueryAccepted );
       
   151     void CancelCurrentQuery();
       
   152     void DoHandleChannelMsgL( TInt aChannelMsg );
       
   153 
       
   154 
       
   155 
       
   156 private: //data
       
   157 
       
   158     ///<Client for which behalf working. Owned.
       
   159     const TIMPSConnectionClient             iClient;
       
   160 
       
   161     ///<The UI to use. Owned.
       
   162     MCnUiUiFacade*                          iUi;
       
   163 
       
   164     ///<Client group channel to get remote UI messages. Owned.
       
   165     CCnUiGroupChannel*                      iGroupChannel;
       
   166 
       
   167     ///<Pointer to currently active query. Owned.
       
   168     MCnUiConnQuery*                         iCurrentQuery;
       
   169 
       
   170 
       
   171     ///< Flags describing the handled events, owned
       
   172     ///< Flag contents are either EFalse or ETrue
       
   173     TBool       iActiveConnectionScheduledClose;
       
   174     TBool       iActiveConnectionSuppressForScheduledConnection;
       
   175 
       
   176     ///<Resource file name, owned
       
   177     HBufC*									iBrandedResourceFileName;
       
   178     };
       
   179 
       
   180 #endif      //__CCNUICLIENTGROUPUINOTIFYHANDLER_H
       
   181 
       
   182 //  End of File
       
   183