menucontentsrv/srvsrc/mcssuiteobjectfactory.cpp
branchRCL_3
changeset 23 ace62b58f4b2
parent 22 1b207dd38b72
child 25 9e077f9a342c
equal deleted inserted replaced
22:1b207dd38b72 23:ace62b58f4b2
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <gecodefaultobject.h>
       
    21 #include <gecodefaultobjectfactory.h>
       
    22 
       
    23 #include "mcssuiteobjectfactory.h"
       
    24 
       
    25 // ================= MEMBER FUNCTIONS =======================
       
    26 
       
    27 // ---------------------------------------------------------
       
    28 // CSuiteObjectFactory::~CSuiteObjectFactory
       
    29 // ---------------------------------------------------------
       
    30 //
       
    31 CSuiteObjectFactory::~CSuiteObjectFactory()
       
    32     {
       
    33     }
       
    34 
       
    35 // ---------------------------------------------------------
       
    36 // CSuiteObjectFactory::NewL
       
    37 // ---------------------------------------------------------
       
    38 //
       
    39 CSuiteObjectFactory* CSuiteObjectFactory::NewL()
       
    40     {
       
    41     CSuiteObjectFactory* factory =
       
    42         new (ELeave) CSuiteObjectFactory();
       
    43     return factory;
       
    44     }
       
    45 
       
    46 // ---------------------------------------------------------
       
    47 // CSuiteObjectFactory::CSuiteObjectFactory
       
    48 // ---------------------------------------------------------
       
    49 //
       
    50 CSuiteObjectFactory::CSuiteObjectFactory()
       
    51     {
       
    52     }
       
    53 
       
    54 
       
    55 // ---------------------------------------------------------
       
    56 // CSuiteObjectFactory::InitializeObjectL
       
    57 // ---------------------------------------------------------
       
    58 //
       
    59 void CSuiteObjectFactory::InitializeObjectL
       
    60 ( MGECOAttributeProvider& aAttributeProvider )
       
    61     {
       
    62     if ( iContext )
       
    63         {
       
    64         //Cast context to GECODefaultObject
       
    65         CGECODefaultObject* temp = 
       
    66             reinterpret_cast<CGECODefaultObject*>( iContext );
       
    67 
       
    68         TInt counter = aAttributeProvider.NumAttributes() - 1;
       
    69         TPtrC name;
       
    70         TPtrC value;
       
    71         TBool islocalized = EFalse;
       
    72         while ( counter >= 0 )
       
    73             {
       
    74             aAttributeProvider.AttributeDetailsL( counter,name,value, islocalized );
       
    75             temp->SetAttributeL( name, value, islocalized );
       
    76             counter--;            
       
    77             }
       
    78         }
       
    79     }
       
    80 
       
    81 //  End of File