mtpfws/mtpfw/datatypes/interface/tmtptypeevent.h
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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef TMTPTYPEEVENT_H
       
    23 #define TMTPTYPEEVENT_H
       
    24 
       
    25 #include <mtp/tmtptypeflatbase.h> 
       
    26 
       
    27 /**
       
    28 Defines the MTP event dataset. This dataset is stored in a contiguous flat 
       
    29 buffer to optimise data transfer to/from the MTP transport layer.
       
    30 @publishedPartner
       
    31 @released 
       
    32 */
       
    33 class TMTPTypeEvent : public TMTPTypeFlatBase
       
    34     {
       
    35     
       
    36 public: 
       
    37 
       
    38     /**
       
    39     MTP event dataset element identifiers.
       
    40     */
       
    41     enum TElements
       
    42         {        
       
    43         /**
       
    44         Event Code.
       
    45         */
       
    46         EEventCode,
       
    47         
       
    48         /**
       
    49         SessionID.
       
    50         */
       
    51         EEventSessionID,
       
    52         
       
    53         /**
       
    54         TransactionID
       
    55         */
       
    56         EEventTransactionID,
       
    57         
       
    58         /**
       
    59         Parameter 1.
       
    60         */
       
    61         EEventParameter1,
       
    62         
       
    63         /**
       
    64         Parameter 2.
       
    65         */
       
    66         EEventParameter2,
       
    67         
       
    68         /**
       
    69         Parameter 3.
       
    70         */
       
    71         EEventParameter3,
       
    72         
       
    73         /**
       
    74         The number of dataset elements.
       
    75         */
       
    76         ENumElements,
       
    77         };
       
    78     
       
    79 public:
       
    80 
       
    81     IMPORT_C TMTPTypeEvent(); 
       
    82     IMPORT_C TMTPTypeEvent(const TMTPTypeEvent& aEvent);
       
    83     
       
    84 public: // From TMTPTypeFlatBase
       
    85     
       
    86     IMPORT_C TUint Type() const;
       
    87     
       
    88 private: // From TMTPTypeFlatBase
       
    89     
       
    90     IMPORT_C const TMTPTypeFlatBase::TElementInfo& ElementInfo(TInt aElementId) const;    
       
    91 
       
    92 private: 
       
    93    
       
    94     /**
       
    95     The dataset size in bytes.
       
    96     */
       
    97     static const TInt                               KSize = 22;
       
    98     
       
    99     /**
       
   100     The dataset element metadata table content.
       
   101     */
       
   102     static const TMTPTypeFlatBase::TElementInfo     iElementMetaData[];
       
   103     
       
   104     /**
       
   105     The dataset element metadata table.
       
   106     */
       
   107     const TFixedArray<TElementInfo, ENumElements>   iElementInfo;
       
   108     
       
   109     /**
       
   110     The data buffer.
       
   111     */
       
   112     TBuf8<KSize>                                    iBuffer; 
       
   113     };
       
   114 
       
   115 #endif // TMTPTYPEEVENT_H