webengine/osswebengine/WebKit/s60/webview/WmlInterfaceImpl.h
changeset 0 dd21522fd290
child 36 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:   Header file for MWKWmlInterface implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef WMLINTERFACEIMPL_H
       
    21 #define WMLINTERFACEIMPL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include "WmlInterface.h"
       
    27 
       
    28 #include "BrCtlDialogsProvider.h"
       
    29 
       
    30 class CBrCtlObjectInfo;
       
    31 class CWmlContentInterface;
       
    32 
       
    33 //Array for start up.
       
    34 
       
    35 const TUint wmlSettingTable[]={ 
       
    36                          TBrCtlDefs::ESettingsLaunchAppUid,
       
    37                          TBrCtlDefs::ESettingsLaunchViewId, 
       
    38                          TBrCtlDefs::ESettingsLaunchCustomMessageId,
       
    39                          TBrCtlDefs::ESettingsAutoLoadImages,
       
    40                          TBrCtlDefs::ESettingsEmbedded,
       
    41                          TBrCtlDefs::ESettingsCookiesEnabled,
       
    42                          TBrCtlDefs::ESettingsECMAScriptEnabled,
       
    43                          TBrCtlDefs::ESettingsIMEINotifyEnabled,
       
    44                          TBrCtlDefs::ESettingsSendRefererHeader,
       
    45                          TBrCtlDefs::ESettingsSecurityWarnings,
       
    46                          TBrCtlDefs::ESettingsPageOverview,
       
    47                          TBrCtlDefs::ESettingsBackList,
       
    48                          TBrCtlDefs::ESettingsAutoRefresh,
       
    49                          TBrCtlDefs::ESettingsTextWrapEnabled,
       
    50                          TBrCtlDefs::ESettingsCharacterset,
       
    51                          TBrCtlDefs::ESettingsCharacterset
       
    52                         };
       
    53 
       
    54 
       
    55 
       
    56 /**
       
    57 *  This observer is notified when the browser requests softkeys changes
       
    58 *
       
    59 *  @lib BrowserEngine.lib
       
    60 *  @since 3.1
       
    61 */
       
    62 
       
    63 NONSHARABLE_CLASS(CWmlInterfaceImpl):public CBase,public MWmlInterface
       
    64     {
       
    65     public: // New functions
       
    66         /**
       
    67         * Free all WML service options
       
    68     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
    69     * void CBrCtl::ResetWmlServiceOptions().
       
    70         * @since 3.1.
       
    71         * @return void
       
    72         */
       
    73 
       
    74          void resetWmlServiceOptions();
       
    75 
       
    76         /**
       
    77         * Add a WML service option.
       
    78     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
    79     * void CBrCtl::WmlServiceOptionsAddItemL
       
    80         * @since 3.1.
       
    81         * @return void
       
    82         */
       
    83 
       
    84         void setWmlServiceOptionsAddItemL(const TText* aText, TUint32 aElemID, TInt aElType);
       
    85  
       
    86     
       
    87     /**
       
    88         * Request the Browser Control to request the host application to update softkeys.
       
    89     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
    90     * void CBrCtl::UpdateSoftkeys()
       
    91         * @since 3.1.
       
    92         * @return void
       
    93         */
       
    94 
       
    95 
       
    96         void setUpdateSoftkeys(void);
       
    97 
       
    98     /**
       
    99         * Browser Control posts the data to the specified url.
       
   100     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
   101     * void CBrCtl::PostUrlL(..)
       
   102         * @since 3.1.
       
   103         * @return void
       
   104         */
       
   105 
       
   106       void setPostUrlL(TDesC& aUrl, TDesC8& aPostData, TDesC& aContentType);
       
   107 
       
   108 
       
   109     /**
       
   110         * Convert a file name to a url.
       
   111     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
   112     * HBufC* CBrCtl::fileNameToUrlLC(..)
       
   113         * @since 3.1.
       
   114         * @return HBufC*
       
   115         */
       
   116 
       
   117 
       
   118     HBufC* fileNameToUrlLC(const TDesC& aFileName);
       
   119 
       
   120     /**
       
   121         * Set the WKScrollingProviderNotifyLayoutChange.
       
   122     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h
       
   123     * void CBrCtlScrollingProvider::NotifyLayoutChange(..)
       
   124         * @since 3.1.
       
   125         * @return void
       
   126         */
       
   127 
       
   128     void scrollingProviderNotifyLayoutChange(TBrCtlLayout aLayout);
       
   129 
       
   130     /**
       
   131         * Set the SetWKScrollingProviderUpdateVScrollBarL.
       
   132     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h
       
   133     * void CBrCtlScrollingProvider::UpdateVScrollBarL(..)
       
   134         * @since 3.1.
       
   135         * @return void
       
   136         */
       
   137 
       
   138 
       
   139     void setScrollingProviderUpdateVScrollBarL( TInt aDocumentHeight,
       
   140                 TInt aDisplayHeight,
       
   141                 TInt aDisplayPosY);
       
   142     /**
       
   143         * Set the SetWKScrollingProviderUpdateHScrollBarL
       
   144     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h
       
   145     * void CBrCtlScrollingProvider::UpdateHScrollBarL(..)
       
   146         * @since 3.1.
       
   147         * @return void
       
   148         */
       
   149 
       
   150     void setScrollingProviderUpdateHScrollBarL( TInt aDocumentWidth,
       
   151                                 TInt aDisplayPosX,
       
   152                 TInt aDisplayPosY);
       
   153 
       
   154 
       
   155 
       
   156     void updateScrollbars(int documentHeight, int displayHeight, int displayPosY,
       
   157                 int documentWidth, int displayWidth, int displayPosX);
       
   158 
       
   159 
       
   160     /**
       
   161         * Used by and defined in support of CWKDialogProvider
       
   162     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h
       
   163     * CBrCtlObjectInfo::CWKObjectInfo() in
       
   164     * [WEBKIT\BrowserControl\src\WKDialogsProviderUtils.cpp]
       
   165         * @since 3.1.
       
   166         * @return CBrCtlObjectInfo*
       
   167         */
       
   168 
       
   169     CBrCtlObjectInfo* objectInfoCreateL();
       
   170 
       
   171         /**
       
   172         * Loads URL and returns the handle to resource
       
   173     * Function \S60\WebEngine\WEBKIT\BrowserView\inc\WebKitLoader.h
       
   174     * CWmlResourceLoadListener* CWebKitLoader::LoadWmlResourceL(..)
       
   175         * @since 3.1.
       
   176         * @return CWmlResourceLoadListener*
       
   177         */
       
   178   
       
   179 
       
   180     //CWmlResourceLoadListener* WKWmlResourceLoadListenerLoadWmlResourceL(CWmlContentInterface& aWmlContentInterface,const TDesC& aURL);
       
   181     void resourceLoadListenerLoadWmlResourceL(const TDesC& aURL);
       
   182 
       
   183         /**
       
   184         * Set the URL
       
   185     * Function \S60\WebEngine\WEBKIT\BrowserView\inc\LoadListeners.h
       
   186     * void CWmlResourceLoadListener::SetUrlL(..)
       
   187         * @since 3.1.
       
   188         * @return void
       
   189         */         
       
   190 
       
   191     void resourceLoadListenerSetUrlL(/*CWmlResourceLoadListener* aListener,*/ const TDesC& aUrl);
       
   192 
       
   193         /**
       
   194         * Find if a specific url is in cache
       
   195     * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtl.h
       
   196     * TBool BrCtl::IsUrlInCache(TDesC& aUrl)
       
   197         * @since 3.1.
       
   198         * @return TBool
       
   199         */       
       
   200     TBool wmlIsUrlInCache(TDesC& aUrl);
       
   201 
       
   202 
       
   203         /**
       
   204         * Find if a specific url is in cache
       
   205     * Function Function WebKitLoader.h
       
   206     * TBool void LoadPageL( const TDesC& aURL, const TDesC& aRereferrer, TBool aReload,
       
   207         *             TBool aOnLoad, const TDesC& aTarget, TEventCode aTriggeringEvent );
       
   208         * @since 3.1.
       
   209         * @return TBool
       
   210         */       
       
   211 
       
   212         void wmlLoadUrlL( const TDesC& aURL, TDesC& aRereferrer, TInt aApId,
       
   213                                TBrCtlDefs::TBrCtlCacheMode aBrCtlCacheMode );
       
   214 
       
   215     //Destructor
       
   216     virtual ~CWmlInterfaceImpl();
       
   217 
       
   218 
       
   219     CWmlInterfaceImpl(CBrCtl& aBrCtl);
       
   220     void loadResource(TDesC8& url,  CWmlContentInterface* content);
       
   221 
       
   222 
       
   223    
       
   224 
       
   225     private:
       
   226       //Browser control reference
       
   227       CBrCtl&   m_brCtl; //Not owned  
       
   228     };
       
   229 
       
   230 #endif      // CBRCTLWMLINTERFACEIMPL_H  
       
   231             
       
   232 // End of File