diff -r 000000000000 -r dd21522fd290 web_pub/browser_control_api/inc/BrCtlDefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlDefs.h Mon Mar 30 12:54:55 2009 +0300 @@ -0,0 +1,822 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Enum Definition of the Browser Control API +* +*/ + + +#ifndef BRCTLDEFS_H +#define BRCTLDEFS_H + +// INCLUDES + +// DATA TYPES + +// FORWARD DECLARATIONS + +// EXPORTED FUNCTION + +/** +* The TBrCtlDefs class contains definitions of custom data types for the Browser Control API. +* +* Usage: +* +* @code +* #include +* +* @see S60 Platform: Browser Control API Developer's Guide Version 2.0 +* @lib BrowserEngine.lib +* @since 3.0 +* @file BrCtlDefs.h +* @endcode * +*/ +class TBrCtlDefs + { + public: + /** + * The Browser Control uses 600 command IDs, whose default + * range is from 15000 - 15600. The host application can specify + * any desired range through the API. + */ + enum TBrCtlCommandId + { + ECommandIdBrowserBase = 0, ///< The base Browser ID. + ECommandIdSubscribeToBase = 90, ///< The SubscribeToBase ID. + ECommandIdPluginBase = 100, ///< The base plug-in ID. + ECommandIdWMLBase = 300, ///< The base WML ID. + ECommandIdRange = 600, ///< The maximum number of command IDs. + ECommandIdBase = 15000 ///< The base value for the command IDs. + + }; + /** + * Rules that determine in which mode the cache operates. + */ + enum TBrCtlCacheMode + { + /** + * Normal caching operation. + * If the requested entity is in the cache and it has not expired, + * get it from the cache. If the requested entity is not in the cache, + * or if it has expired, the browser should request it from the server. + */ + ECacheModeNormal = 0, + /** + * If the requested entity is in the cache, get it from the cache + * even if it has expired. If the requested entity is not in the cache, + * the browser should request it from the server. + */ + ECacheModeHistory, + /** + * The browser should request the content from the server even if it is in the cache. + */ + ECacheModeNoCache, + /** + * If the requested entity is in the cache, get it from the cache + * even if it has expired. If the requested entity is not in the cache, + * return an error. + */ + ECacheModeOnlyCache + }; + /** + * The host application can send these commands + * to the Browser Control by calling the HandleCommandL function. + * @attention The host application should define the base for the command + * IDs and add that base to the enum value of each command. + */ + enum TBrCtlCommands + { + ECommandDisconnect = 0, ///< Unloads the HTTP Framework + ECommandCancelFetch, ///< Cancels all outstanding requests + ECommandOpen, ///< Activates the focused element + ECommandReload, ///< Reloads the current page + ECommandBack, ///< Loads the previous page, if available + /** + * Loads the next page. This command is used only to return + * to the next page after going back to a previous page. + */ + ECommandForward, + ECommandClearHistory, ///< Clears the history stack + /** + * Shows a list of history entries. Do not use this parameter if + * LoadDataL or InitLoadDataL are used. + */ + ECommandShowHistory, + ECommandAccept, ///< Accepts the input data in the editor. + /** + * Cancels the input data in the editor. Sets the focus back + * on the browser after the focus is shifted to a plug-in. + */ + ECommandCancel, + ECommandOpenToViewer, ///< Opens object data in an external viewer + /** + * Adds the contact information of the link currently selected to + * the phone book + */ + ECommandAddToPhoneBook, + /** + *Makes a phone call using the phone number in the link currently selected + */ + ECommandMakeCall, + ECommandRemoveFileName, ///< Removes the file name from a file selection box + ECommandShowImages, ///< Shows a list of the images in the current page + ECommandLoadImages, ///< Loads images when automatic image loading is turned off + ECommandGainFocus, ///< Called when the Browser Control returns from background + ECommandLoseFocus, ///< Called when the Browser Control goes to the background + /** + * Do not call this parameter. It is a base for the next three commands. + */ + ECommandFindItem, + /** + * Displays the FindItem dialog and highlights all of the + * phone numbers in the current page. Use this parameter only + * if you specified the ECapabilityFindItem capability. + */ + ECommandFindItemPhoneNumber, + /** + * Displays the FindItem dialog and highlights all of the e-mail + * addresses in the current page. Use this parameter only if you + * specified the ECapabilityFindItem capability. + */ + ECommandFindItemEMail, + /** + * Displays the FindItem dialog and highlights all of the URLs in + * the current page. Use this parameter only if you specified + * the ECapabilityFindItem capability. + */ + ECommandFindItemAddress, + ECommandFindKeyword, ///< Reserved for future use. + ECommandClearFind, ///< Reserved for future use. + ECommandShowThumbnailView, ///< Reserved for future use. + ECommandShowDownloads, ///< Tells the Download Manager to display the list of downloads. + /** + * Saves the following launch parameters when the application + * unexpectedly shuts down. These parameters all have the prefix ESettingsLaunch: + * AppUid, ViewId, CustomMessageId + * When the phone reboots, it uses these parameters to restart + * the host application and resume the interrupted downloads. + * NOTE: These parameters must be set before calling this command. + */ + ECommandSaveLaunchParams, + ECommandOneStepBack, ///< Reserved for future use. + ECommandAppForeground, ///< + ECommandAppBackground, ///< + ECommandOpenNewWindow, ///< + ECommandClearAutoFormFillData, ///< + ECommandClearAutoFormFillPasswordData, ///< + ECommandFreeMemory, ///< + ECommandMemoryGood, ///< + ECommandDumpRenderTree, ///< + ECommandUnloadWMLEngine, ///< + ECommandSmartLinkMakeCall, ///< + ECommandSmartLinkSendMessage, ///< + ECommandSmartLinkAddToPhoneBook, ///< + ECommandShowToolBar, /// element + * 4. Detected from HTTP headers + * 5. Variant-specific default character set for automatic detection. + * Possible character codings are: + * Latin + * Simplified Chinese + * Traditional Chinese + * Unicode (UTF-8) + * Unicode (ucs-2) + * ISO 8859 - 2,4,5,7,or 9 + * Hebrew (ISO-Logical) + * Hebrew (ISO-Visual) + * Hebrew (Windows) + * Arabic (ISO) + * Arabic (Windows) + * Windows - 1250, 1251, 1253, 1254, or 1257 + * Thai + * Thai (Windows 874) + * Shift_jis + * Euc-jp + * ISO-2022-jp + * The default value is variant-specific. + */ + ESettingsCharacterset, + /** + * URL of the initial page. Tells the + * Browser Control to send the referrer header in the request. + */ + ESettingsSendRefererHeader, + /** + * One of the following: + * Certificate not valid yet + * Server certificate expired + * Server certificate not received + * Invalid server certificate + * Authority certificate not valid yet + * Authority certificate expired + * Authority certificate not found + * Authority certificate corrupted + */ + ESettingsSecurityWarnings, + /** + * Default access point for the Browser Control to use when + * connecting to the network. + */ + ESettingsApId, + ESettingsCurrentZoomLevelIndex, ///< Reserved for future use. + ESettingsPageOverview, ///< Reserved for future use. + ESettingsNumOfDownloads, ///< Number of downloads in progress. + /** + * UID of the application to + * restart after a reboot in order to continue an interrupted download. + */ + ESettingsLaunchAppUid, + /** + * View ID of the application to + * restart after a reboot in order to continue an interrupted download. + */ + ESettingsLaunchViewId, + /** + * Message that asks the user whether to resume the download. + */ + ESettingsLaunchCustomMessageId, ///< Reserved for future use. + ESettingsBackList, ///< Reserved for future use. + ESettingsAutoRefresh, ///< Reserved for future use. + /** + * If set, the browser encodes URLs using UTF-8 instead of + * the original content encoding. + * @attention This is recommended only for the APAC region. + */ + ESettingsBrowserUtf8Encoding, + ESettingsAutoFormFillEnabled, ///< For enabling the auto fill + ESettingsSavedPage, ///< Save the page + ESettingsSmartLink, + ESettingsAutoOpenDownloads, // For automatically open the downloaded files + ESettingsDisableFlash, ///