mmsharing/mmshui/src/musuisendview.cpp
branchRCL_3
changeset 33 bc78a40cd63c
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     1 /*
       
     2 * Copyright (c) 2005 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:  The MUS application's UI class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "musuisendview.h"
       
    20 #include "musuiappui.h"
       
    21 #include "musuisendcontroller.h"
       
    22 #include "musuisendviewcontainer.h"
       
    23 #include "musuidefinitions.h"
       
    24 #include "musuidialogutil.h"
       
    25 #include "muslogger.h" // debug logging
       
    26 
       
    27 #include <musui.rsg>
       
    28 
       
    29 #include <aknViewAppUi.h>
       
    30 
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // EPOC two-phased constructor
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 void CMusUiSendView::ConstructL()
       
    37     {
       
    38     MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendView::ConstructL" );
       
    39     CMusUiGeneralView::ConstructL();
       
    40     MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendView::ConstructL" );
       
    41     }
       
    42 
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // Destructor
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CMusUiSendView::~CMusUiSendView()
       
    49     {
       
    50     MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendView::~CMusUiSendView" );
       
    51     MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendView::~CMusUiSendView" );
       
    52     }
       
    53 
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 void CMusUiSendView::ManualAddressEntryL( const TDesC& aAddress )
       
    60     {
       
    61     MUS_LOG_TDESC( "mus: [MUSUI ]    -> CMusUiSendView::ManualAddressEntryL: ",
       
    62                             aAddress );
       
    63      
       
    64     
       
    65      TBuf<KMusSipAddressMaxLength> address( aAddress );
       
    66     if ( SendController() && MusUiDialogUtil::ShowTextQueryDialogL( 
       
    67                                     R_MUS_TEXT_ENTER_ADDRESS_DIALOG_PROMPT, 
       
    68                                     address ) )
       
    69         {      
       
    70         SendController()->InviteL( address );
       
    71         }
       
    72     else
       
    73         {  
       
    74         if ( SendController() && SendController()->IsAudioRoutingLoudSpeaker() )
       
    75             {
       
    76             MusUiDialogUtil::ShowGlobalInformationDialogL( 
       
    77 					 R_MUS_NOTE_HF_DEACTIVATED );
       
    78             }
       
    79         MusUiDialogUtil::ShowGlobalInformationDialogL( 
       
    80                             R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED );
       
    81         MusAppUi()->HandleExit();
       
    82         }
       
    83 
       
    84     MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendView::ManualAddressEntryL" );
       
    85     }
       
    86 
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 CMusUiEventController* CMusUiSendView::EventController() const
       
    93     {
       
    94     return SendController();
       
    95     }
       
    96 
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 CMusUiViewContainer& CMusUiSendView::SharingContainer() const
       
   103     {
       
   104     return *SendContainer();
       
   105     }
       
   106         
       
   107 
       
   108 // -----------------------------------------------------------------------------
       
   109 // From CAknView, Gets called from framework when activating this view
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 void CMusUiSendView::DoActivateL( const TVwsViewId& aPrevViewId,
       
   113                                     TUid aCustomMessageId,
       
   114                                     const TDesC8& aCustomMessage )
       
   115     {
       
   116     // Base class activation first
       
   117     CMusUiGeneralView::DoActivateL( aPrevViewId,
       
   118                                     aCustomMessageId,
       
   119                                     aCustomMessage ); 
       
   120                                     
       
   121     }
       
   122 
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // From AknView, Gets called from framework when deactivating this view
       
   126 // -----------------------------------------------------------------------------
       
   127 //
       
   128 void CMusUiSendView::DoDeactivate()
       
   129     {
       
   130     CMusUiGeneralView::DoDeactivate(); // Base class deactivation first
       
   131     }
       
   132     
       
   133     
       
   134 // -----------------------------------------------------------------------------
       
   135 // Called when focus event occurs.
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 void CMusUiSendView::DoHandleForegroundEventL( TBool aForeground )
       
   139     {
       
   140     CMusUiGeneralView::HandleForegroundEventL( 
       
   141                                 aForeground, 
       
   142                                 iOperatorSpecificFunctionality &&
       
   143                                 EventControllerL().ConnectionEstablished() &&
       
   144                                 !EventControllerL().ExitOccured() );
       
   145     }    
       
   146 
       
   147 
       
   148 // end of file