mtptransports/mtpptpiptransport/ptpipdatatypes/src/tptpipinitevtreq.cpp
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-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 // tptpipinitevetreq.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalComponent
       
    20 */
       
    21 
       
    22 
       
    23 #include "tptpipinitevtreq.h"
       
    24 #include "ptpipdatatypes.h"     
       
    25 // Dataset element metadata.
       
    26 const TPTPIPInitEvtRequest::TElementInfo TPTPIPInitEvtRequest::iElementMetaData[ENumElements] = 
       
    27     {
       
    28         {EMTPTypeUINT32,	0,	KMTPTypeUINT32Size},     // EbmRequestType
       
    29         {EMTPTypeUINT32,	4,	KMTPTypeUINT32Size},     // EbRequest
       
    30         {EMTPTypeUINT32,	8,	KMTPTypeUINT32Size},    // EwValue
       
    31     }; 
       
    32 
       
    33 /** 
       
    34 Constructor
       
    35 */
       
    36 EXPORT_C TPTPIPInitEvtRequest::TPTPIPInitEvtRequest() :
       
    37     iElementInfo(iElementMetaData, ENumElements),
       
    38     iBuffer(KSize)
       
    39     {
       
    40     SetBuffer(iBuffer);
       
    41     }     
       
    42 
       
    43 EXPORT_C TUint TPTPIPInitEvtRequest::Type() const
       
    44 	{
       
    45 	return EPTPIPTypeInitEvtRequest;
       
    46 	}
       
    47     
       
    48 EXPORT_C const TMTPTypeFlatBase::TElementInfo& TPTPIPInitEvtRequest::ElementInfo(TInt aElementId) const
       
    49     {
       
    50     __ASSERT_DEBUG((aElementId < ENumElements), User::Invariant());
       
    51     return iElementInfo[aElementId];
       
    52     }
       
    53