srsf/nssvasapi/nssvasdb/nssvasdbeventnotifier/src/nssvascvasdbevent.cpp
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2002 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:  The CNssVASDBEvent encapsulates events occuring on the VAS DB.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include  "nssvascvasdbevent.h"
       
    21 #include  "nssvasctag.h"
       
    22 
       
    23 
       
    24 // ================= MEMBER FUNCTIONS =======================
       
    25 
       
    26 // C++ constructor can NOT contain any code that
       
    27 // might leave.
       
    28 //
       
    29 CNssVASDBEvent::CNssVASDBEvent()
       
    30 {
       
    31 }
       
    32 
       
    33 // 2 Phase constructor
       
    34 //
       
    35 CNssVASDBEvent* CNssVASDBEvent::NewL(TVASDBEventType& aType, MNssTag* aTag)
       
    36 {
       
    37 	CNssVASDBEvent* self = NewLC(aType, aTag);
       
    38 	CleanupStack::Pop(self);
       
    39 	return self;
       
    40 }
       
    41 
       
    42 // 2 Phase constructor
       
    43 //
       
    44 CNssVASDBEvent* CNssVASDBEvent::NewLC(TVASDBEventType& aType, MNssTag* aTag)
       
    45 {
       
    46 	CNssVASDBEvent* self = new (ELeave) CNssVASDBEvent;
       
    47 	CleanupStack::PushL(self);
       
    48 	self->ConstructL(aType, aTag);
       
    49 	return self;
       
    50 }
       
    51 
       
    52 // EPOC Constructor
       
    53 //
       
    54 void CNssVASDBEvent::ConstructL(TVASDBEventType& aType, MNssTag *aTag)
       
    55 {
       
    56 	iType = aType;
       
    57 	if(aTag)
       
    58 		iTag = ((CNssTag*)aTag)->CopyL();
       
    59 }
       
    60 
       
    61 
       
    62     
       
    63 // Destructor
       
    64 //
       
    65 CNssVASDBEvent::~CNssVASDBEvent()
       
    66 {
       
    67 	 if(iTag)
       
    68 	 {
       
    69 		 delete iTag;
       
    70 	 }
       
    71 }
       
    72 
       
    73 
       
    74 // returns the type of event
       
    75 //
       
    76 EXPORT_C CNssVASDBEvent::TVASDBEventType CNssVASDBEvent:: Type()
       
    77 {
       
    78     return iType;
       
    79 }
       
    80 
       
    81 
       
    82 // returns the tag on which the event occured,
       
    83 //
       
    84 EXPORT_C MNssTag* CNssVASDBEvent::Tag()
       
    85 {
       
    86 	return iTag;
       
    87 }
       
    88 
       
    89 
       
    90 
       
    91 
       
    92 //  End of File