mpx/playbackframework/playbackengine/src/mpxplaybackplugininfo.cpp
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Derived plugin info class for playback tags
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <e32base.h>
       
    21 #include <mpxuser.h>
       
    22 #include <mpxlog.h>
       
    23 #include <mpxplugininfo.h>
       
    24 #include "mpxplaybackplugininfo.h"
       
    25 
       
    26 _LIT8(KMPXPluginSupportedInterfacesTag, "<z>" );
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // Constructor
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 CMPXPlaybackPluginInfo::CMPXPlaybackPluginInfo()
       
    33     {
       
    34     
       
    35     }
       
    36 
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // 2nd phase constructor
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 void CMPXPlaybackPluginInfo::ConstructL( const CImplementationInformation& aData )
       
    43     {
       
    44     iSupportedInterfaces = new(ELeave)CDesCArrayFlat(KMPXArrayGranularity);
       
    45     
       
    46     // Base constructor
       
    47     CMPXPluginInfo::ConstructL( aData );    
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // Two-Phased constructor
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 CMPXPlaybackPluginInfo* CMPXPlaybackPluginInfo::NewL( 
       
    55                                      const CImplementationInformation& aData )
       
    56     {
       
    57     CMPXPlaybackPluginInfo* self = new( ELeave ) CMPXPlaybackPluginInfo;
       
    58     CleanupStack::PushL( self );
       
    59     self->ConstructL( aData );
       
    60     CleanupStack::Pop( self );
       
    61     return self;
       
    62     }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // Two-phased constructor
       
    66 // ---------------------------------------------------------------------------
       
    67 //
       
    68 CMPXPlaybackPluginInfo* CMPXPlaybackPluginInfo::NewLC( 
       
    69                                      const CImplementationInformation& aData )
       
    70     {
       
    71     CMPXPlaybackPluginInfo* self = new( ELeave ) CMPXPlaybackPluginInfo;
       
    72     CleanupStack::PushL( self );
       
    73     self->ConstructL( aData );
       
    74     return self;
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // Virtual destructor
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 CMPXPlaybackPluginInfo::~CMPXPlaybackPluginInfo()
       
    82     {
       
    83     delete iSupportedInterfaces;
       
    84     }
       
    85 
       
    86 // ---------------------------------------------------------------------------
       
    87 // Extended tag parsing functionality
       
    88 // ---------------------------------------------------------------------------
       
    89 //
       
    90 void CMPXPlaybackPluginInfo::ProcessTaggedDataExL( const TDesC8& aTag,
       
    91                                                      const TDesC8& aData)
       
    92     {
       
    93     if( aTag == KMPXPluginSupportedInterfacesTag )
       
    94         {
       
    95         ExtractSupportedInterfacesL( aData );
       
    96         }
       
    97     }
       
    98 
       
    99 // ---------------------------------------------------------------------------
       
   100 // Get the list of supported interfaces
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 const CDesCArray& CMPXPlaybackPluginInfo::SupportedInterfaces() const
       
   104     {
       
   105     return *iSupportedInterfaces;
       
   106     }
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 // Process the non-cacheable attributes
       
   110 // ---------------------------------------------------------------------------
       
   111 //
       
   112 void CMPXPlaybackPluginInfo::ExtractSupportedInterfacesL( const TDesC8& aData )
       
   113     {
       
   114     iSupportedInterfaces->Reset();
       
   115     ExtractIntoArrayL(aData, iSupportedInterfaces);
       
   116     }
       
   117 
       
   118 // END OF FILE