svgtviewer/SvgtViewerPlugin/UIControlSrc/SvgtEvent.cpp
branchRCL_3
changeset 14 20b99a6d6175
parent 0 632761c941a7
equal deleted inserted replaced
13:e52958d06c29 14:20b99a6d6175
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "SvgtEvent.h"
       
    19 
       
    20 CSvgtEvent::CSvgtEvent(CSvgtEvent::TSvgtEventType aEventType,  const TDesC& aUri):
       
    21                             iEventType (aEventType)
       
    22     {
       
    23     iUri = aUri.Alloc();
       
    24     }
       
    25 
       
    26 CSvgtEvent::~CSvgtEvent()
       
    27     {
       
    28     delete iUri;
       
    29     }
       
    30     
       
    31 CSvgtEvent::TSvgtEventType CSvgtEvent::EventType() const
       
    32     {
       
    33     return iEventType;
       
    34     }
       
    35 
       
    36 TPtrC CSvgtEvent::ImageUri() const
       
    37     {
       
    38     return TPtrC( iUri->Des() );
       
    39     }
       
    40 
       
    41 CSvgtEventEmbededImage::CSvgtEventEmbededImage( const TDesC& aUri):
       
    42                         CSvgtEvent(CSvgtEvent::ESvgtEventEmbededImage, aUri)
       
    43     {
       
    44     
       
    45     }
       
    46 CSvgtEventFetchImage::CSvgtEventFetchImage( const TDesC& aUri):
       
    47                         CSvgtEvent(CSvgtEvent::ESvgtEventFetchImage, aUri)
       
    48     {
       
    49     }
       
    50     
       
    51 CSvgtEventLinkActivated::CSvgtEventLinkActivated( const TDesC& aUri):
       
    52                         CSvgtEvent(CSvgtEvent::ESvgtEventLinkActivated, aUri)
       
    53     {
       
    54     }
       
    55 
       
    56 CSvgtEventLinkActivatedWithShow::CSvgtEventLinkActivatedWithShow( const TDesC& aUri, 
       
    57                                 const TDesC& aShow): 
       
    58                                 CSvgtEvent(CSvgtEvent::ESvgtEventLinkActivatedWithShow, aUri)
       
    59     {
       
    60     iShow = aShow.Alloc();
       
    61     }
       
    62     
       
    63 TPtrC CSvgtEventLinkActivatedWithShow::Show() const
       
    64     {
       
    65     return TPtrC(iShow->Des());
       
    66     }
       
    67 
       
    68 CSvgtEventRedraw::CSvgtEventRedraw() : CSvgtEvent( CSvgtEvent::ESvgtEventRedraw, KNullDesC )
       
    69     {
       
    70     }
       
    71 
       
    72 //End of file