mmsharing/mmshui/tsrc/ut_ui/src/musuieventobserveradapter.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 0 f0cf47e981f9
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     1 /*
       
     2 * Copyright (c) 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "musuieventobserveradapter.h"
       
    19 
       
    20 
       
    21 // ---- MEMBER FUNCTIONS OF CMusUiObserversStub --------------------------------
       
    22 
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 //
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 CMusUiEventObserverAdapter::CMusUiEventObserverAdapter()
       
    29     {
       
    30     // NOP
       
    31     // Initialize...
       
    32     iCalledObserver = ENone;
       
    33     iBoolReturn = EFalse;
       
    34     iErrorCode = KErrUnknown;
       
    35     iPrompt = NULL;
       
    36     }
       
    37 
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 CMusUiEventObserverAdapter::~CMusUiEventObserverAdapter()
       
    44     {
       
    45     delete iPrompt;
       
    46     }
       
    47 
       
    48 
       
    49 // -------- Functions from MMusUiEventObserver -----------------
       
    50 
       
    51 void CMusUiEventObserverAdapter::ActivateLocalMusViewL( TUid aViewId )
       
    52     {
       
    53     iCalledObserver = EActivateLocalMusViewL;
       
    54     iViewId = aViewId;
       
    55     User::LeaveIfError( iErrorCode );
       
    56     }
       
    57 
       
    58 
       
    59 void CMusUiEventObserverAdapter::ActivateLocalMusViewL( TUid aViewId,
       
    60                                     TUid aCustomMessageId,
       
    61                               const TDesC8& aCustomMessage )
       
    62     {
       
    63     iCalledObserver = EActivateLocalMusViewL2;
       
    64     iViewId = aViewId;
       
    65     User::LeaveIfError( iErrorCode );
       
    66     }
       
    67 
       
    68 
       
    69 TBool CMusUiEventObserverAdapter::ShowConfirmationQueryDialogL( const TDesC& aPrompt )
       
    70     {
       
    71     iPrompt = aPrompt.AllocL();
       
    72     iCalledObserver = EShowConfirmationQueryDialogL;
       
    73     User::LeaveIfError( iErrorCode );
       
    74     }
       
    75 
       
    76 void CMusUiEventObserverAdapter::ShowInformationDialogL( const TDesC& aPrompt )
       
    77     {
       
    78     iCalledObserver = EShowInformationDialogL;
       
    79     User::LeaveIfError( iErrorCode );
       
    80     }
       
    81 
       
    82 
       
    83 
       
    84 void CMusUiEventObserverAdapter::ActivateContactViewL(  TContactItemId aId )
       
    85     {
       
    86     iCalledObserver = EActivateContactViewL;
       
    87     iActivatedContactId = aId;
       
    88     User::LeaveIfError( iErrorCode );
       
    89     }
       
    90 
       
    91 
       
    92 
       
    93 void CMusUiEventObserverAdapter::HandleError( const TInt aReason )
       
    94     {
       
    95     iHandleErrorReason = aReason;
       
    96     iCalledObserver = EHandleError;
       
    97     }
       
    98 
       
    99 
       
   100 void CMusUiEventObserverAdapter::HandleExitL()
       
   101     {
       
   102     iCalledObserver = EHandleExitL;
       
   103     User::LeaveIfError( iErrorCode );
       
   104     }
       
   105