bearermanagement/extendedconnpref/src/extendedconnpreffactory.cpp
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <extendedconnpref.h>
       
    17 #include <ecom/implementationproxy.h>
       
    18 #include <comms-infras/metatype.h>
       
    19 
       
    20 
       
    21 // SMetaDataECom macros
       
    22 
       
    23 
       
    24 NONSHARABLE_CLASS( CExtendedConnPrefFactory ) : public CBase
       
    25 /** Connection generic parameter set factory.
       
    26 
       
    27 @internalComponent
       
    28 */
       
    29     {
       
    30 public:
       
    31     static Meta::SMetaDataECom* NewL( TAny* aConstructionParameters );
       
    32     };
       
    33 
       
    34 const TImplementationProxy ImplementationTable[] = 
       
    35 	{
       
    36 	IMPLEMENTATION_PROXY_ENTRY(TExtendedConnPref::EUid, CExtendedConnPrefFactory::NewL),
       
    37 	};
       
    38 
       
    39 /**
       
    40 ECOM Implementation Factories
       
    41 */
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CExtendedConnPrefFactory::NewL
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 Meta::SMetaDataECom* CExtendedConnPrefFactory::NewL(TAny* aConstructionParameters)
       
    48     {
       
    49     TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters);
       
    50     switch (type)
       
    51         {
       
    52     case (TExtendedConnPref::ETypeId):
       
    53         return new (ELeave) TExtendedConnPref;
       
    54     default:
       
    55         User::Leave(KErrNotFound);
       
    56         return NULL;
       
    57         }
       
    58     }
       
    59     
       
    60 //extern "C" { IMPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount); }
       
    61 
       
    62 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
    63     {
       
    64     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
    65 
       
    66     return ImplementationTable;
       
    67     }