mpx/viewframework/baseviewplugins/src/mpxviewplugin.cpp
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     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:  MPX view plugin definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <mpxcustomcommandobserver.h>
       
    22 #include "mpxviewplugin.h"
       
    23 
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // Two-phased constructor.
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CMPXViewPlugin* CMPXViewPlugin::NewL( 
       
    32     const TUid& aUid, 
       
    33     MMPXCustomCommandObserver* aCommandObserver )
       
    34     {
       
    35     TAny* plugin = REComSession::CreateImplementationL( 
       
    36         aUid, 
       
    37         _FOFF( CMPXViewPlugin, iDtorKey ) );
       
    38     CMPXViewPlugin* self = reinterpret_cast<CMPXViewPlugin*>( plugin );
       
    39     self->SetObserver( aCommandObserver );
       
    40     return self;
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // Destructor
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C CMPXViewPlugin::~CMPXViewPlugin()
       
    48     {
       
    49     REComSession::DestroyedImplementation( iDtorKey );
       
    50     }
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // Set command observer
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 EXPORT_C void CMPXViewPlugin::SetObserver( 
       
    57     MMPXCustomCommandObserver* aCommandObserver )
       
    58     {
       
    59     iCommandObserver = aCommandObserver;
       
    60     }
       
    61 
       
    62 // End of File