webengine/osswebengine/WebKit/s60/webview/WmlInterface.h
changeset 0 dd21522fd290
child 25 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 the License "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:   All function that is required by the wmlengine from webkit.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef WMLINTERFACE_H
       
    21 #define WMLINTERFACE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include "BrCtlDefs.h"
       
    27 #include "BrCtl.h" 
       
    28 
       
    29 class CWmlContentInterface;
       
    30 
       
    31 class MWmlInterface
       
    32     {
       
    33     public: // New functions
       
    34 
       
    35     /**
       
    36      * virtual destructor
       
    37      */
       
    38     inline virtual ~MWmlInterface() {};
       
    39         
       
    40         /**
       
    41         * Free all WML service options
       
    42     * Function BrCtl.h
       
    43     * void CBrCtl::ResetWmlServiceOptions().
       
    44         * @since 3.1.
       
    45         * @return void
       
    46         */
       
    47 
       
    48         virtual void resetWmlServiceOptions() = 0;
       
    49 
       
    50         /**
       
    51         * Add a WML service option.
       
    52     * Function BrCtl.h
       
    53     * void CBrCtl::WmlServiceOptionsAddItemL
       
    54         * @since 3.1.
       
    55         * @return void
       
    56         */
       
    57 
       
    58         virtual void setWmlServiceOptionsAddItemL(const TText* aText, TUint32 aElemID, TInt aElType) = 0;
       
    59  
       
    60     /**
       
    61         * Request the Browser Control to request the host application to update softkeys.
       
    62     * Function BrCtl.h
       
    63     * void CBrCtl::UpdateSoftkeys()
       
    64         * @since 3.1.
       
    65         * @return void
       
    66         */
       
    67 
       
    68         virtual void setUpdateSoftkeys(void) = 0;
       
    69 
       
    70     /**
       
    71         * Browser Control posts the data to the specified url.
       
    72     * Function BrCtl.h
       
    73     * void CBrCtl::PostUrlL(..)
       
    74         * @since 3.1.
       
    75         * @return void
       
    76         */
       
    77 
       
    78 
       
    79     virtual void setPostUrlL(TDesC& aUrl, TDesC8& aPostData, TDesC& aContentType) = 0;
       
    80 
       
    81     /**
       
    82         * Convert a file name to a url.
       
    83     * Function BrCtl.h
       
    84     * HBufC* CBrCtl::FileNameToUrlLC(..)
       
    85         * @since 3.1.
       
    86         * @return HBufC*
       
    87         */
       
    88 
       
    89     virtual HBufC* fileNameToUrlLC(const TDesC& aFileName) = 0;
       
    90 
       
    91     /**
       
    92         * Set the WKScrollingProviderNotifyLayoutChange.
       
    93     * Function BrCtlDialogsProvider.h
       
    94     * void CBrCtlScrollingProvider::NotifyLayoutChange(..)
       
    95         * @since 3.1.
       
    96         * @return void
       
    97         */
       
    98 
       
    99       virtual void scrollingProviderNotifyLayoutChange(TBrCtlLayout aLayout) = 0;
       
   100 
       
   101     /**
       
   102         * Set the SetWKScrollingProviderUpdateVScrollBarL.
       
   103     * Function BrCtlDialogsProvider.h
       
   104     * void CBrCtlScrollingProvider::UpdateVScrollBarL(..)
       
   105         * @since 3.1.
       
   106         * @return void
       
   107         */
       
   108 
       
   109 
       
   110     virtual void setScrollingProviderUpdateVScrollBarL( TInt aDocumentHeight,
       
   111                 TInt aDisplayHeight,
       
   112                 TInt aDisplayPosY ) = 0;
       
   113 
       
   114     /**
       
   115         * Set the SetWKScrollingProviderUpdateHScrollBarL
       
   116     * Function BrCtlDialogsProvider.h
       
   117     * void CBrCtlScrollingProvider::UpdateHScrollBarL(..)
       
   118         * @since 3.1.
       
   119         * @return void
       
   120         */
       
   121 
       
   122 
       
   123     virtual void setScrollingProviderUpdateHScrollBarL( TInt aDocumentWidth,
       
   124                                 TInt aDisplayWidth,
       
   125                                 TInt aDisplayPosX ) = 0;  
       
   126 
       
   127     virtual void updateScrollbars(int documentHeight, int displayHeight, int displayPosY,
       
   128                 int documentWidth, int displayWidth, int displayPosX) = 0;
       
   129 
       
   130      /**
       
   131         * Used by and defined in support of CWKDialogProvider
       
   132     * Function BrCtlDialogsProvider.h
       
   133     * CBrCtlObjectInfo::CWKObjectInfo() in
       
   134     * [WEBKIT\BrowserControl\src\WKDialogsProviderUtils.cpp]
       
   135         * @since 3.1.
       
   136         * @return CBrCtlObjectInfo*
       
   137         */
       
   138 
       
   139     virtual CBrCtlObjectInfo* objectInfoCreateL() = 0;
       
   140     
       
   141 
       
   142         /**
       
   143         * Loads URL and returns the handle to resource
       
   144     * Function WebKitLoader.h
       
   145     * CWmlResourceLoadListener* CWebKitLoader::LoadWmlResourceL(..)
       
   146         * @since 3.1.
       
   147         * @return CWmlResourceLoadListener*
       
   148         */
       
   149 
       
   150 
       
   151     //virtual CWmlResourceLoadListener* WKWmlResourceLoadListenerLoadWmlResourceL(CWmlContentInterface& aWmlContentInterface, const TDesC& aURL) = 0;
       
   152     virtual void resourceLoadListenerLoadWmlResourceL(const TDesC& aURL) = 0;
       
   153 
       
   154         /**
       
   155         * Set the URL
       
   156     * Function LoadListeners.h
       
   157     * void CWmlResourceLoadListener::SetUrlL(..)
       
   158         * @since 3.1.
       
   159         * @return void
       
   160         */ 
       
   161 
       
   162     virtual void resourceLoadListenerSetUrlL(/*CWmlResourceLoadListener* aListener,*/const TDesC& aUrl) = 0;
       
   163 
       
   164     /**
       
   165         * Find if a specific url is in cache
       
   166     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
   167     * TBool BrCtl::IsUrlInCache(TDesC& aUrl)
       
   168         * @since 3.1.
       
   169         * @return TBool
       
   170         */       
       
   171     virtual TBool wmlIsUrlInCache(TDesC& aUrl) = 0;
       
   172 
       
   173        /**
       
   174         * Find if a specific url is in cache
       
   175     * Function Function WebKitLoader.h
       
   176     * TBool void LoadPageL( const TDesC& aURL, const TDesC& aRereferrer, TBool aReload,
       
   177         *             TBool aOnLoad, const TDesC& aTarget, TEventCode aTriggeringEvent );
       
   178         * @since 3.1.
       
   179         * @return TBool
       
   180         */       
       
   181 
       
   182         virtual void wmlLoadUrlL( const TDesC& aURL, TDesC& aRereferrer, TInt aApId,
       
   183                                TBrCtlDefs::TBrCtlCacheMode aBrCtlCacheMode) = 0;
       
   184 
       
   185         virtual void loadResource(TDesC8& url, CWmlContentInterface* content) = 0;
       
   186 
       
   187     };
       
   188 
       
   189 #endif      // BRCTLWMLINTERFACE_H
       
   190             
       
   191 // End of File