datacommsserver/esockserver/subcon_params/src/cs_genevent.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     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 // Implementation for CEventParamsGranted and CEventParamsChanged.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21  @prototype
       
    22 */
       
    23 
       
    24 
       
    25 #include "cs_genevent.h"
       
    26 
       
    27 
       
    28 START_ATTRIBUTE_TABLE( CEventParamsGranted, KEventTypeImplUid, KEventParamsGranted )
       
    29 	REGISTER_ATTRIBUTE( CEventParamsGranted, iFamilyBundle, TMeta<RParameterFamilyBundle>)
       
    30 END_ATTRIBUTE_TABLE()
       
    31 
       
    32 START_ATTRIBUTE_TABLE( CEventParamsChanged, KEventTypeImplUid, KEventParamsChanged )
       
    33 	REGISTER_ATTRIBUTE( CEventParamsChanged, iError, TMetaNumber)
       
    34 END_ATTRIBUTE_TABLE_BASE(CEventParamsGranted, 0)
       
    35 
       
    36 
       
    37 CEventParamsGranted::~CEventParamsGranted()
       
    38 	{
       
    39 	if(!iFamilyBundle.IsNull())
       
    40 		{
       
    41 		iFamilyBundle.Destroy();
       
    42 		}
       
    43 	}
       
    44 
       
    45 CEventParamsChanged::~CEventParamsChanged()
       
    46 	{
       
    47 	}
       
    48 
       
    49 
       
    50 XPlaneEvent* CPlaneEventFactory::NewL(TAny* aConstructionParameters)
       
    51 	{
       
    52 	TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters);
       
    53 	switch (type)
       
    54 		{
       
    55 	case (KEventParamsGranted):
       
    56 		return new (ELeave) CEventParamsGranted;
       
    57 	case (KEventParamsChanged):
       
    58 		return new (ELeave) CEventParamsChanged;
       
    59 	default:
       
    60 		User::Leave(KErrNotFound);
       
    61 		}
       
    62 	return NULL;
       
    63 	}
       
    64 
       
    65 
       
    66 
       
    67