convergedconnectionhandler/cchclientapi/inc/cchuiglobalqueryhandler.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:  Class handling notifier plugin usage.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CCHUIGLOBALQUERYHANDLER_H
       
    20 #define C_CCHUIGLOBALQUERYHANDLER_H
       
    21 
       
    22 #include <AknNotify.h>
       
    23 #include <AknsItemID.h>
       
    24 #include <AknNotifyStd.h>
       
    25 #include <AknQueryDialog.h>
       
    26 
       
    27 #include "cchuicommon.hrh"
       
    28 
       
    29 class CAknSDData;
       
    30 
       
    31 
       
    32 /**
       
    33  * Global query handler.
       
    34  * This class handles qlobal query usage in cchui.
       
    35  *
       
    36  * @code
       
    37  *  //Example how to show change connection query. You need to inherint class
       
    38  *  //that is using globalqueryhandler from CActive to get result in 
       
    39  *  //RunL when dialog is completed.
       
    40  *  iGlobalQueryHandler = CCchUiGlobalQueryHandler::NewL();
       
    41  *  TInt serviceId( KServiceId );
       
    42  *  MCchUiObserver::TCchUiDialogType dialog = 
       
    43  *      MCchUiObserver::ECchUiDialogTypeChangeConnection;
       
    44  *  iGlobalQueryHandler->ShowMsgQueryL( dialog, iStatus, serviceId );
       
    45  *  SetActive();
       
    46  * @endcode
       
    47  *
       
    48  * @lib cchui.lib
       
    49  * @since S60 5.0
       
    50  */
       
    51 NONSHARABLE_CLASS( CCchUiGlobalQueryHandler ): public CBase
       
    52     {
       
    53 public:
       
    54     
       
    55     /**
       
    56      * Two-phased constructor.
       
    57      */
       
    58     static CCchUiGlobalQueryHandler* NewL();
       
    59     
       
    60     /**
       
    61      * Two-phased constructor.
       
    62      */
       
    63     static CCchUiGlobalQueryHandler* NewLC();
       
    64 
       
    65     /**
       
    66      * Destructor.
       
    67      */
       
    68     virtual ~CCchUiGlobalQueryHandler();
       
    69     
       
    70     
       
    71     /**
       
    72      * Shows global message query asynchronously.
       
    73      *
       
    74      * @since S60 5.0
       
    75      * @param aNote Note mode.
       
    76      * @param aStatus Asynchronic observer iStatus.
       
    77      * @param aServiceId Service id.
       
    78      * @param aIapId iap id.
       
    79      * @param aUserName service username.
       
    80      */
       
    81     void ShowMsgQueryL( 
       
    82         MCchUiObserver::TCchUiDialogType aNote,
       
    83         TRequestStatus& aStatus,
       
    84         TUint aServiceId,
       
    85         TUint aIapId,
       
    86         RBuf& aUserName );
       
    87        
       
    88     /**
       
    89      * Update the softkeys of the message query.
       
    90      *
       
    91      * @since S60 5.0
       
    92      * @param aSoftkeys New resource for softkeys.
       
    93      */
       
    94     void UpdateMsgQuery( TInt aSoftkeys );
       
    95     
       
    96     /**
       
    97      * Cancel the message query.
       
    98      *
       
    99      * @since S60 5.0
       
   100      */
       
   101     void CancelMsgQuery();
       
   102     
       
   103     /**
       
   104      * Returns result params.
       
   105      *
       
   106      * @since S60 5.0
       
   107      * @return Result params.
       
   108      */
       
   109     TCCHUiNotifierParams ResultParams();
       
   110     
       
   111     
       
   112 private:
       
   113 
       
   114     CCchUiGlobalQueryHandler();
       
   115     
       
   116     void ConstructL();
       
   117     
       
   118 
       
   119 private: // data
       
   120     
       
   121     /**
       
   122      * Handle to RNotifier.
       
   123      */
       
   124     RNotifier iNotify;
       
   125     
       
   126     /**
       
   127      * Global query command.
       
   128      */
       
   129     TAknGlobalQueryCmd iCmd;
       
   130     
       
   131     /**
       
   132      * Notifier params package.
       
   133      */
       
   134     TCCHUiNotifierParamsPckg iPckg;
       
   135     
       
   136     /**
       
   137      * Contains resource id for softkeys.
       
   138      */
       
   139     TInt iSoftkeys;
       
   140     
       
   141     /**
       
   142      * State of iNotify
       
   143      */
       
   144     TBool iNotifyStarted;
       
   145     
       
   146     CCHUI_UNIT_TEST( UT_CchUi )
       
   147     };
       
   148 
       
   149 #endif // C_CCHUIGLOBALQUERYHANDLER_H