graphicsuis_plat/svgt_viewer_ui_api/inc/SVGTAppObserver.h
branchRCL_3
changeset 20 5fd161fa28b6
parent 0 632761c941a7
equal deleted inserted replaced
17:e52958d06c29 20:5fd161fa28b6
       
     1 /*
       
     2 * Copyright (c) 2004,2005 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:  Mixin Class that defines the call back interface used
       
    15 *                by application using the SVGT Control.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef SVGTAPPOBSERVER_H
       
    21 #define SVGTAPPOBSERVER_H
       
    22 
       
    23 /**
       
    24 *  MSvgtAppObserver is an interface class used by SVGT control to callback to
       
    25 *   the application.
       
    26 *  @lib SVGTUIControl.lib
       
    27 *  @since 3.0
       
    28 */
       
    29 
       
    30 class MSvgtAppObserver
       
    31 {
       
    32     public: 
       
    33 
       
    34            
       
    35         /**
       
    36         * This method is called to retrieve the absolute path of an image gvien
       
    37         * the uri. The SVGT control requests the absolute path to provide the     
       
    38         * client with control of the location of the images.
       
    39         * @since 3.0
       
    40         * see MSvgRequestObserver::FetchImage
       
    41         */                                       
       
    42         virtual TInt  FetchImage( const TDesC& aUri, 
       
    43              RFs& aSession, RFile& aFileHandle ) = 0;                                  
       
    44                                   
       
    45         /**
       
    46         * This method is called to notify the client that a link has been
       
    47         * activated.
       
    48         *
       
    49         * @since 3.0
       
    50         * @param : aUri -- URI string of hyperlink
       
    51         * @return : For future use.  Value is ignored.
       
    52         */
       
    53         virtual TBool LinkActivated( const TDesC& aUri ) = 0 ;
       
    54 
       
    55          /**
       
    56          * This method is called to notify the client that a link has been
       
    57          * activated.  When Show is also present .
       
    58          *
       
    59          * @since 3.0
       
    60          * @param : aUri -- URI string of hyperlink
       
    61          * @param : aShow -- xlink:show value
       
    62          * @return : For future use.  Value is ignored.
       
    63          */
       
    64         virtual TBool LinkActivatedWithShow( const TDesC& aUri, 
       
    65                                              const TDesC& aShow ) = 0;
       
    66                                              
       
    67         /**
       
    68         * This method is called to notify the client that download menu has 
       
    69         * been selected in the UI dialog
       
    70         * @since 3.0     
       
    71         */                                             
       
    72         virtual void DisplayDownloadMenuL( void ) = 0;
       
    73 
       
    74         /**
       
    75         * This method is called to get the SMIL fit value to be used by the
       
    76         * engine.
       
    77         * @since 3.0     
       
    78         */                                             
       
    79         virtual void GetSmilFitValue( TDes& aSmilValue ) = 0;
       
    80                                                      
       
    81         /**
       
    82         * This method is called to check from the client if Save option
       
    83         * should be displayed.
       
    84         *
       
    85         * @since 3.0
       
    86         * @return : ETrue: Save can be shown. EFalse: Save can't be shown.
       
    87         */
       
    88         virtual TBool CanShowSave() = 0;
       
    89 
       
    90         /**
       
    91         * This method is called to check from the client if Saving 
       
    92         * is done already
       
    93         *
       
    94         * @since 3.0
       
    95         * @return : ETrue: The content is saved
       
    96         *           EFalse: content is not saved
       
    97         */
       
    98         virtual TBool IsSavingDone() = 0;
       
    99         
       
   100         /**
       
   101         * This method is called to check from the client if Downloads option
       
   102         * should be displayed.
       
   103         *
       
   104         * @since 3.0
       
   105         * @return : ETrue: Downloads can be shown. 
       
   106         *           EFalse: Downloads can't be shown.
       
   107         */
       
   108         virtual TBool CanShowDownload() const = 0;
       
   109 
       
   110 
       
   111         /**
       
   112         * This method is called to perform the save operation. 
       
   113         * Note the Save functionality depends on the client invoking
       
   114         * the dialog. E.g. Browser->SVGT-Viewer->Dialog then save
       
   115         * results in Move operation to save memory.
       
   116         * param aButtonId context in which save is called
       
   117         * @since 3.0
       
   118         * @return : void.
       
   119         */
       
   120 
       
   121         virtual void DoSaveL( TInt aButtonid ) = 0;
       
   122 
       
   123         /**
       
   124         * This method is called to retrieve the absolute path of an image given
       
   125         * the uri. The SVGT control requests the absolute path to provide the     
       
   126         * client with control of the location of the images. This function should
       
   127         * be an asynchronous, i.e. it should not block.
       
   128         * On completion of fetching of the file, it should notify the control
       
   129         * using AssignImageData() function
       
   130         * @since 3.1
       
   131         * see MSvgRequestObserver::ImageDataReference
       
   132         */                                       
       
   133         virtual TInt NewFetchImageData( const TDesC& aUri ) = 0;
       
   134 
       
   135         /**
       
   136         * This method is called instead of NewFetchImageData in case the image 
       
   137         * is defined as part of the SVG content itself i.e. inline using base-64
       
   138         * encoding for eg.
       
   139         * @since 3.1
       
   140         * see MSvgRequestObserver::ImageDataReference
       
   141         */                                       
       
   142         virtual void AssignEmbededDataL( const TDesC& aUri ) = 0;
       
   143         virtual TBool ExitWhenOrientationChange() = 0 ; 
       
   144 };
       
   145 #endif
       
   146 // End of File