voiceui/pbkinfoviewimpl/src/pbkinfoviewapi.cpp
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     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:  Contains functions that are exported from PbkInfoView for 
       
    15 *               PbkInfoView AIW provider.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <eikenv.h>
       
    21 #include "pbkinfoviewapi.h"
       
    22 #include <pbkinfoview.rsg>
       
    23 #include "pbkinfoviewdialog.h"
       
    24 #include "rubydebug.h"
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CPbkInfoViewApi::NewL
       
    30 //
       
    31 // Two-phased constructor.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 EXPORT_C CPbkInfoViewApi* CPbkInfoViewApi::NewL()
       
    35     {
       
    36     CPbkInfoViewApi* self = new (ELeave) CPbkInfoViewApi();
       
    37     CleanupStack::PushL(self);
       
    38 	self->ConstructL();
       
    39     CleanupStack::Pop(self);
       
    40 
       
    41 	return self;
       
    42     }
       
    43 
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // Destructor.
       
    47 //
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CPbkInfoViewApi::~CPbkInfoViewApi()
       
    51     {
       
    52     }
       
    53 
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CPbkInfoViewApi::ConstructL
       
    57 //
       
    58 // Symbian 2nd phase constructor can leave.
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 void CPbkInfoViewApi::ConstructL()
       
    62     {
       
    63     }
       
    64 
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // CPbkInfoViewApi::CPbkInfoViewApi
       
    68 //
       
    69 // C++ default constructor can NOT contain any code, that
       
    70 // might leave.
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 CPbkInfoViewApi::CPbkInfoViewApi()
       
    74     {
       
    75     }
       
    76 
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // CPbkInfoViewApi::ShowInfoViewL
       
    80 // Shows info view displaying voice commands related to the contact.
       
    81 // @param aContactId Contact id from contacts db.
       
    82 // @return None.
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 EXPORT_C void CPbkInfoViewApi::ShowInfoViewL( TInt aContactId )
       
    86     {
       
    87     RUBY_DEBUG_BLOCKL( "CPbkInfoViewApi::ShowInfoViewL" );
       
    88     
       
    89     CPbkInfoViewDialog* infoViewDialog = CPbkInfoViewDialog::NewL( aContactId );
       
    90     CleanupStack::PushL( infoViewDialog );
       
    91 
       
    92     // Framework handles the destruction of infoViewDialog;
       
    93     infoViewDialog->ExecuteLD( R_INFOVIEW_DIALOG );
       
    94 
       
    95     CleanupStack::Pop( infoViewDialog );
       
    96 	}
       
    97 
       
    98 
       
    99 // End of file