mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackplugin.inl
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     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:  Inline implementation of playback plugin constructor/destructor
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // ======================= INLINE MEMBER FUNCTIONS ============================
       
    20 
       
    21 // ----------------------------------------------------------------------------
       
    22 // Two-phased constructor.
       
    23 // ----------------------------------------------------------------------------
       
    24 //
       
    25 inline CMPXPlaybackPlugin* CMPXPlaybackPlugin::NewL(TUid aUid, 
       
    26                                           MMPXPlaybackPluginObserver& aObs)
       
    27     {
       
    28     CMPXPlaybackPlugin* self = reinterpret_cast<CMPXPlaybackPlugin*>(
       
    29            REComSession::CreateImplementationL(aUid,
       
    30                                           _FOFF(CMPXPlaybackPlugin,iDtorKey)));
       
    31     self->iUid = aUid;
       
    32     self->SetObserver( aObs );
       
    33     return self; 
       
    34     }
       
    35 
       
    36 // ----------------------------------------------------------------------------
       
    37 // Two-phased constructor.
       
    38 // ----------------------------------------------------------------------------
       
    39 //
       
    40 inline CMPXPlaybackPlugin* CMPXPlaybackPlugin::NewL(TUid aUid)
       
    41     {
       
    42     CMPXPlaybackPlugin* self = reinterpret_cast<CMPXPlaybackPlugin*>(
       
    43            REComSession::CreateImplementationL(aUid,
       
    44                                           _FOFF(CMPXPlaybackPlugin,iDtorKey)));
       
    45     self->iUid = aUid;
       
    46     return self; 
       
    47     }
       
    48 
       
    49 // ----------------------------------------------------------------------------
       
    50 // plugin destruction
       
    51 // ----------------------------------------------------------------------------
       
    52 //
       
    53 inline CMPXPlaybackPlugin::~CMPXPlaybackPlugin()
       
    54     { 
       
    55     REComSession::DestroyedImplementation(iDtorKey);
       
    56     }
       
    57 
       
    58 // ----------------------------------------------------------------------------
       
    59 // Returns implemenation uid of the plugin
       
    60 // ----------------------------------------------------------------------------
       
    61 //
       
    62 inline const TUid& CMPXPlaybackPlugin::Uid()
       
    63     {
       
    64     return iUid;
       
    65     }
       
    66 
       
    67 // ----------------------------------------------------------------------------
       
    68 // Set observer
       
    69 // ----------------------------------------------------------------------------
       
    70 //
       
    71 inline void CMPXPlaybackPlugin::SetObserver(MMPXPlaybackPluginObserver& aObs)
       
    72     {
       
    73     iObs = &aObs;
       
    74     }