mpx/commonframework/common/src/mpxmessage.cpp
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 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:  implementation of message 
       
    15 *
       
    16 */
       
    17 
       
    18 #include "mpxmessage.h"
       
    19 
       
    20 // -----------------------------------------------------------------------------
       
    21 // C++ constructor
       
    22 // -----------------------------------------------------------------------------
       
    23 //
       
    24 EXPORT_C TMPXMessage::TMPXMessage(TInt aEvent,
       
    25                                 TInt aType /*= 0*/,
       
    26                                 TInt aData /*= 0*/)
       
    27     : iEvent(aEvent),iType(aType),iData(aData)
       
    28     {}
       
    29         
       
    30 // -----------------------------------------------------------------------------
       
    31 // C++ constructor
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 EXPORT_C TMPXMessage::TMPXMessage()
       
    35     : iEvent(0),iType(0),iData(0)
       
    36     {} 
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // Copy constructor
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 EXPORT_C TMPXMessage::TMPXMessage(const TMPXMessage& aMsg)
       
    43     : iEvent(aMsg.iEvent), iType(aMsg.iType),iData(aMsg.iData) 
       
    44     {
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // Overloaded assignment operator
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 EXPORT_C TMPXMessage& TMPXMessage::operator=(const TMPXMessage& aMsg)
       
    52     {
       
    53     if (this != &aMsg)
       
    54         {
       
    55         iEvent = aMsg.iEvent;
       
    56         iType = aMsg.iType;
       
    57         iData = aMsg.iData;
       
    58         }
       
    59     return *this;    
       
    60     }
       
    61     
       
    62 // -----------------------------------------------------------------------------
       
    63 // Message event
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C TInt TMPXMessage::Event() const
       
    67     {
       
    68     return iEvent;
       
    69     }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // Message type
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 EXPORT_C TInt TMPXMessage::Type() const
       
    76     {
       
    77     return iType;
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // Message data
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 EXPORT_C TInt TMPXMessage::Data() const
       
    85     {
       
    86     return iData;
       
    87     }
       
    88     
       
    89