mpx/collectionframework/collectionengine/src/mpxcollectionplugininfo.cpp
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2007 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 collection tags
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32base.h>
       
    20 #include "mpxcollectionplugininfo.h"
       
    21 
       
    22 _LIT8(KMPXPluginCacheTag, "<c>" );
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // Constructor
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 CMPXCollectionPluginInfo::CMPXCollectionPluginInfo()
       
    29     {
       
    30     
       
    31     }
       
    32 
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 // 2nd phase constructor
       
    36 // ---------------------------------------------------------------------------
       
    37 //
       
    38 void CMPXCollectionPluginInfo::ConstructL( const CImplementationInformation& aData )
       
    39     {
       
    40     // Base constructor
       
    41     CMPXPluginInfo::ConstructL( aData );
       
    42     }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // Two-Phased constructor
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 CMPXCollectionPluginInfo* CMPXCollectionPluginInfo::NewL( 
       
    49                                      const CImplementationInformation& aData )
       
    50     {
       
    51     CMPXCollectionPluginInfo* self = new( ELeave ) CMPXCollectionPluginInfo;
       
    52     CleanupStack::PushL( self );
       
    53     self->ConstructL( aData );
       
    54     CleanupStack::Pop( self );
       
    55     return self;
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // Two-phased constructor
       
    60 // ---------------------------------------------------------------------------
       
    61 //
       
    62 CMPXCollectionPluginInfo* CMPXCollectionPluginInfo::NewLC( 
       
    63                                      const CImplementationInformation& aData )
       
    64     {
       
    65     CMPXCollectionPluginInfo* self = new( ELeave ) CMPXCollectionPluginInfo;
       
    66     CleanupStack::PushL( self );
       
    67     self->ConstructL( aData );
       
    68     return self;
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // Virtual destructor
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 CMPXCollectionPluginInfo::~CMPXCollectionPluginInfo()
       
    76     {
       
    77     iNonCachableAttrs.Close();
       
    78     }
       
    79 
       
    80 // ---------------------------------------------------------------------------
       
    81 // Extended tag parsing functionality
       
    82 // ---------------------------------------------------------------------------
       
    83 //
       
    84 void CMPXCollectionPluginInfo::ProcessTaggedDataExL( const TDesC8& aTag,
       
    85                                                      const TDesC8& aData)
       
    86     {
       
    87     if( aTag == KMPXPluginCacheTag )
       
    88         {
       
    89         ExtractNonCacheableAttrsL( aData );
       
    90         }
       
    91     }
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // Get the list of non-cacheable attributes
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 const TArray<TUid> CMPXCollectionPluginInfo::NonCacheableAttrs()
       
    98     {
       
    99     return iNonCachableAttrs.Array();
       
   100     }
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // Process the non-cacheable attributes
       
   104 // ---------------------------------------------------------------------------
       
   105 //
       
   106 void CMPXCollectionPluginInfo::ExtractNonCacheableAttrsL( const TDesC8& aData )
       
   107     {
       
   108     ExtractUidsFromTextL( aData, iNonCachableAttrs );
       
   109     }
       
   110 
       
   111 // END OF FILE