omadrm/drmengine/notifier/src/DRMEvent.cpp
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2004-2006 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:  Notification Event object base class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    <DRMEvent.h>
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 // EXTERNAL FUNCTION PROTOTYPES  
       
    25 // CONSTANTS
       
    26 // MACROS
       
    27 // LOCAL CONSTANTS AND MACROS
       
    28 // MODULE DATA STRUCTURES
       
    29 // LOCAL FUNCTION PROTOTYPES
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 // ============================ MEMBER FUNCTIONS ===============================
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // MDRMEvent::MDRMEvent
       
    36 // C++ default constructor can NOT contain any code, that
       
    37 // might leave.
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 EXPORT_C MDRMEvent::MDRMEvent( 
       
    41     const TDRMEventType& aEvent ) : iType( aEvent ) 
       
    42     {
       
    43     };
       
    44     
       
    45 // Destructor
       
    46 EXPORT_C MDRMEvent::~MDRMEvent()
       
    47     {
       
    48     };
       
    49 
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // MDRMEvent::ExternalizeL
       
    53 // Writes the data of the object into the given stream
       
    54 // (other items were commented in a header).
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 EXPORT_C void MDRMEvent::ExternalizeL(
       
    58     RWriteStream& aOutput)
       
    59     {
       
    60     // this implementation may need to be changed if the type of the internal
       
    61     // data is changed
       
    62     aOutput.WriteUint32L(iType);
       
    63     };
       
    64 
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // MDRMEvent::InternalizeL
       
    68 // Reads the data of the object from the given stream
       
    69 // (other items were commented in a header).
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 EXPORT_C void MDRMEvent::InternalizeL(
       
    73     RReadStream& aInput) 
       
    74     {
       
    75     // this implementation may need to be changed if the type of the internal
       
    76     // data is changed
       
    77     iType = aInput.ReadUint32L();
       
    78     };
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // MDRMEvent::GetEventType
       
    82 // Returns the event type of the object a return parameter
       
    83 // (other items were commented in a header).
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C void MDRMEvent::GetEventType(
       
    87     TDRMEventType& aEventType) const 
       
    88     {
       
    89     aEventType = iType;
       
    90     };
       
    91 
       
    92 //  End of File