mmsharing/mmshui/tsrc/ut_ui/inc/musuieventobserveradapter.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 0 f0cf47e981f9
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     1 /*
       
     2 * Copyright (c) 2006 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef UT_MUSUIOBSERVERSSTUB_H
       
    21 #define UT_MUSUIOBSERVERSSTUB_H
       
    22 
       
    23 
       
    24 #include "musuieventobserver.h"
       
    25 
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <aknappui.h>
       
    29 
       
    30 /**
       
    31 *
       
    32 * @lib musengine.lib
       
    33 * @since S60 v3.2
       
    34 */
       
    35 class CMusUiEventObserverAdapter : public CBase,
       
    36                                    public MMusUiEventObserver
       
    37     {
       
    38 
       
    39 
       
    40 
       
    41     public:
       
    42 
       
    43         CMusUiEventObserverAdapter();
       
    44 
       
    45         ~CMusUiEventObserverAdapter();
       
    46 
       
    47 
       
    48     public: // MMusUiEventObserver
       
    49 
       
    50         void ActivateLocalMusViewL( TUid aViewId );
       
    51         void ActivateLocalMusViewL( TUid aViewId,
       
    52                                             TUid aCustomMessageId,
       
    53                                       const TDesC8& aCustomMessage );
       
    54         TBool ShowConfirmationQueryDialogL( const TDesC& aPrompt );
       
    55         void ShowInformationDialogL( const TDesC& aPrompt );
       
    56         void ActivateContactViewL( TContactItemId aId );
       
    57         void HandleError( const TInt aReason ); // All ready defined
       
    58         void HandleExitL();
       
    59 
       
    60 
       
    61     public: // Helper
       
    62 
       
    63         /**
       
    64         * ETrue if all boolean member variables are set to EFalse and all the
       
    65         * pointers are NULL
       
    66         */
       
    67         TBool IsReseted();
       
    68 
       
    69         /**
       
    70         * Resets all the boolean member variable values to EFalse and deletes
       
    71         * and nullifies all the pointer variables.
       
    72         */
       
    73         void Reset();
       
    74 
       
    75     public: // Data
       
    76 
       
    77         enum TMusUiEventObserverFunction
       
    78             {
       
    79             ENone,                          // default value
       
    80 
       
    81             // MMusUiEventObserver
       
    82             EActivateLocalMusViewL,
       
    83             EActivateLocalMusViewL2,
       
    84             EShowConfirmationQueryDialogL,
       
    85             EShowInformationDialogL,
       
    86             EActivateContactViewL,
       
    87             EHandleError,
       
    88             EHandleExitL,
       
    89 
       
    90             };
       
    91 
       
    92 
       
    93         TInt iHandleErrorReason;
       
    94         TContactItemId iActivatedContactId;
       
    95 
       
    96         TMusUiEventObserverFunction iCalledObserver;
       
    97 
       
    98         TBool iBoolReturn;
       
    99         TInt iErrorCode;
       
   100 
       
   101         TUid iViewId;
       
   102         
       
   103         HBufC*  iPrompt;
       
   104         
       
   105 
       
   106     };
       
   107 
       
   108 
       
   109 
       
   110 
       
   111 #endif // UT_MUSSTUBS_H
       
   112