2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Enum Definition of the Browser Control API
26 // FORWARD DECLARATIONS
31 * The TBrCtlDefs class contains definitions of custom data types for the Browser Control API.
36 * #include <BrCtlDefs.h>
38 * @see S60 Platform: Browser Control API Developer's Guide Version 2.0
39 * @lib BrowserEngine.lib
48 * The Browser Control uses 600 command IDs, whose default
49 * range is from 15000 - 15600. The host application can specify
50 * any desired range through the API.
54 ECommandIdBrowserBase = 0, ///< The base Browser ID.
55 ECommandIdSubscribeToBase = 90, ///< The SubscribeToBase ID.
56 ECommandIdPluginBase = 100, ///< The base plug-in ID.
57 ECommandIdWMLBase = 300, ///< The base WML ID.
58 ECommandIdRange = 600, ///< The maximum number of command IDs.
59 ECommandIdBase = 15000 ///< The base value for the command IDs.
63 * Rules that determine in which mode the cache operates.
68 * Normal caching operation.
69 * If the requested entity is in the cache and it has not expired,
70 * get it from the cache. If the requested entity is not in the cache,
71 * or if it has expired, the browser should request it from the server.
75 * If the requested entity is in the cache, get it from the cache
76 * even if it has expired. If the requested entity is not in the cache,
77 * the browser should request it from the server.
81 * The browser should request the content from the server even if it is in the cache.
85 * If the requested entity is in the cache, get it from the cache
86 * even if it has expired. If the requested entity is not in the cache,
92 * The host application can send these commands
93 * to the Browser Control by calling the HandleCommandL function.
94 * @attention The host application should define the base for the command
95 * IDs and add that base to the enum value of each command.
99 ECommandDisconnect = 0, ///< Unloads the HTTP Framework
100 ECommandCancelFetch, ///< Cancels all outstanding requests
101 ECommandOpen, ///< Activates the focused element
102 ECommandReload, ///< Reloads the current page
103 ECommandBack, ///< Loads the previous page, if available
105 * Loads the next page. This command is used only to return
106 * to the next page after going back to a previous page.
109 ECommandClearHistory, ///< Clears the history stack
111 * Shows a list of history entries. Do not use this parameter if
112 * LoadDataL or InitLoadDataL are used.
115 ECommandAccept, ///< Accepts the input data in the editor.
117 * Cancels the input data in the editor. Sets the focus back
118 * on the browser after the focus is shifted to a plug-in.
121 ECommandOpenToViewer, ///< Opens object data in an external viewer
123 * Adds the contact information of the link currently selected to
126 ECommandAddToPhoneBook,
128 *Makes a phone call using the phone number in the link currently selected
131 ECommandRemoveFileName, ///< Removes the file name from a file selection box
132 ECommandShowImages, ///< Shows a list of the images in the current page
133 ECommandLoadImages, ///< Loads images when automatic image loading is turned off
134 ECommandGainFocus, ///< Called when the Browser Control returns from background
135 ECommandLoseFocus, ///< Called when the Browser Control goes to the background
137 * Do not call this parameter. It is a base for the next three commands.
141 * Displays the FindItem dialog and highlights all of the
142 * phone numbers in the current page. Use this parameter only
143 * if you specified the ECapabilityFindItem capability.
145 ECommandFindItemPhoneNumber,
147 * Displays the FindItem dialog and highlights all of the e-mail
148 * addresses in the current page. Use this parameter only if you
149 * specified the ECapabilityFindItem capability.
151 ECommandFindItemEMail,
153 * Displays the FindItem dialog and highlights all of the URLs in
154 * the current page. Use this parameter only if you specified
155 * the ECapabilityFindItem capability.
157 ECommandFindItemAddress,
158 ECommandFindKeyword, ///< Reserved for future use.
159 ECommandClearFind, ///< Reserved for future use.
160 ECommandShowThumbnailView, ///< Reserved for future use.
161 ECommandShowDownloads, ///< Tells the Download Manager to display the list of downloads.
163 * Saves the following launch parameters when the application
164 * unexpectedly shuts down. These parameters all have the prefix ESettingsLaunch:
165 * AppUid, ViewId, CustomMessageId
166 * When the phone reboots, it uses these parameters to restart
167 * the host application and resume the interrupted downloads.
168 * NOTE: These parameters must be set before calling this command.
170 ECommandSaveLaunchParams,
171 ECommandOneStepBack, ///< Reserved for future use.
172 ECommandAppForeground, ///<
173 ECommandAppBackground, ///<
174 ECommandOpenNewWindow, ///<
175 ECommandClearAutoFormFillData, ///<
176 ECommandClearAutoFormFillPasswordData, ///<
177 ECommandFreeMemory, ///<
178 ECommandMemoryGood, ///<
179 ECommandDumpRenderTree, ///<
180 ECommandUnloadWMLEngine, ///<
181 ECommandSmartLinkMakeCall, ///<
182 ECommandSmartLinkSendMessage, ///<
183 ECommandSmartLinkAddToPhoneBook, ///<
184 ECommandShowToolBar, ///<Shows the toolbar
185 ECommandSmartLinkSendEmail, ///<
186 ECommandShowAnchorHref, ///<Display the URL of a hyperlink - supported only for HTML
187 ECommandLoadFocusedImage, ///<Load the focuesd image - supported only for HTML
188 ECommandUnLoadPluginWindows, ///<Unload plugin windows
190 * Displays the FindItem dialog and highlights all of the VoIP
191 * addresses in the current page. Use this parameter only if you
192 * specified the ECapabilityFindItem capability.
194 ECommandFindItemVoIPAddress, ///<Find VoIP address item
195 ECommandSmartLinkMakeVoipCall, ///<MakeVoip Callthrough smartlink
197 * Zoom Slider configuration.
199 ECommandZoomSliderShow, ///< Zoom slider visible.
200 ECommandZoomSliderHide, ///< Zoom slider hidden.
201 ECommandHistoryNavigateForward,
202 ECommandHistoryNavigateBack,
204 ** Enter/Exit Fullscreen Browsing
206 ECommandEnterFullscreenBrowsing,
207 ECommandLeaveFullscreenBrowsing,
212 * The load event that occurred.
216 EEventNone = 0, // Non event, Not used.
218 * A page is beginning to load. This includes images, scripts,
219 * style sheets, and anything else embedded in the page as a single load event.
221 EEventNewContentStart,
222 /** A URL is beginning to load. This notifies the observer of a
223 * separate load event for each image or other element embedded in the page.
225 EEventUrlLoadingStart,
227 * The first data chunk has arrived. This occurs when the response
228 * headers are received.
230 EEventNewUrlContentArrived,
232 * Another data chunk has arrived.
233 * This occurs for each chunk of data that is loaded, including the first chunk.
235 EEventMoreUrlContentArrived,
237 * The first chunk of content is displayed. The previous page is
238 * destroyed at this time. This occurs once per page.
240 EEventNewContentDisplayed,
242 * Another chunk of content is displayed. This occurs for each
243 * chunk of content that is displayed, except for the first chunk.
245 EEventMoreContentDisplayed,
246 EEventUrlLoadingFinished, ///< A URL has finished loading.
248 * The page has finished loading. If the host application draws a
249 * progress bar, it can be removed when this event is received.
252 EEventContentFinished, ///< The content has finished loading.
254 * A page title was encountered. After receiving this
255 * event, the host application can call PageInfoLC to receive the page title.
257 EEventTitleAvailable,
258 EEventLoadError, ///< An error occurred while loading the page.
260 * The user is navigating from a non-secure page to a secure page.
261 * The host application displays a secure icon, if needed.
263 EEventEnteringSecurePage,
265 * The user is navigating from a secure page to a non-secure page.
266 * If the host application displays a secure icon, that icon should be removed.
268 EEventExitingSecurePage,
270 * The user is entering a secure page that contains non-secure items.
272 EEventSomeItemsNotSecure,
274 * The user is submitting information to a non-secure page.
276 EEventSubmittingToNonSecurePage,
278 * User confirmation is required to redirect the browser.
280 EEventRedirectConfirmation,
282 * User confirmation is required to repost a page that has been viewed previously.
284 EEventRepostConfirmation,
286 * The user is entering a non-secure page that contains secure items.
288 EEventSecureItemInNonSecurePage,
290 * Authentication failed or was cancelled.
292 EEventAuthenticationFailed,
294 * A file is beginning to upload.
298 * A file has finished uploading; the last chunk of data has been transmitted.
300 EEventUploadFinished,
302 * Length of the data transmitted and the cumulative size of the uploaded file.
304 EEventUploadIncrement,
305 EEventFaviconAvailable,
306 EEventThumbnailAvailable
309 * The setting to manipulate.
314 ESettingsUnknown = -1, ///< Not used
316 * If set to On, large pages are optimized for display on a small screen.
317 * If set to Off, all pages display in their original format.
319 ESettingsSmallScreen = 0,
321 * If set to On, images automatically load when a page is downloaded.
322 * If set to Off, images are not loaded. Default: On
324 ESettingsAutoLoadImages,
326 * If set to All.Large, all text is shown 40% larger than its declared size.
327 * If set to Larger, all text is shown 20% larger than its declared size.
328 * If set to Normal, all text is shown as its declared size.
329 * If set to Smaller, all text is shown 20% smaller than its declared size.
330 * If set to All.Small, all text is shown 40% smaller than its declared size.
334 * If set to On, the host application is embedded within another application.
335 * If set to Off, the host application is not embedded within another application.
339 * If set to On, paragraphs are automatically wrapped to fit into the display width.
340 * If set to Off, paragraphs are not automatically wrapped.
341 * @attention This parameter is not shown if ESettingsSmallScreen is set to On.
343 ESettingsTextWrapEnabled,
345 * If set to Allow, the user can send and receive cookie information.
346 * If set to Reject, the user cannot send or receive cookie information.
348 ESettingsCookiesEnabled,
350 * If set to Finest, external style sheets are downloaded when
351 * Small Screen Layout is used. If set to Fastest, external style
352 * sheets are not downloaded when Small Screen Layout is used.
353 * Default value: Fastest
355 ESettingsCSSFetchEnabled,
357 * If set to Enable, ECMA Script is enabled.
358 * If set to Disable, ECMA Script is disabled.
359 * Default value: Enable
361 ESettingsECMAScriptEnabled,
363 * Device unique identification number sent to a server for billing
364 * purposes in e-commerce. If set to Enable, the Browser Control
365 * sends the International Mobile Equipment Identity (IMEI) to the server.
366 * If set to Disable, the Browser Control does not send the IMEI to the server.
367 * Default value: Disable
369 ESettingsIMEINotifyEnabled,
371 * Character coding. If set to Automatic, the character set is
372 * automatically selected according to the following criteria, in order or priority:
373 * 1. Detected from the Byte Order Mark (BOM)
374 * 2. Detected from XML Document Type Definition (DTD)
375 * 3. Declared in <meta> element
376 * 4. Detected from HTTP headers
377 * 5. Variant-specific default character set for automatic detection.
378 * Possible character codings are:
381 * Traditional Chinese
384 * ISO 8859 - 2,4,5,7,or 9
385 * Hebrew (ISO-Logical)
386 * Hebrew (ISO-Visual)
390 * Windows - 1250, 1251, 1253, 1254, or 1257
396 * The default value is variant-specific.
398 ESettingsCharacterset,
400 * URL of the initial page. Tells the
401 * Browser Control to send the referrer header in the request.
403 ESettingsSendRefererHeader,
405 * One of the following:
406 * Certificate not valid yet
407 * Server certificate expired
408 * Server certificate not received
409 * Invalid server certificate
410 * Authority certificate not valid yet
411 * Authority certificate expired
412 * Authority certificate not found
413 * Authority certificate corrupted
415 ESettingsSecurityWarnings,
417 * Default access point for the Browser Control to use when
418 * connecting to the network.
421 ESettingsCurrentZoomLevelIndex, ///< Reserved for future use.
422 ESettingsPageOverview, ///< Reserved for future use.
423 ESettingsNumOfDownloads, ///< Number of downloads in progress.
425 * UID of the application to
426 * restart after a reboot in order to continue an interrupted download.
428 ESettingsLaunchAppUid,
430 * View ID of the application to
431 * restart after a reboot in order to continue an interrupted download.
433 ESettingsLaunchViewId,
435 * Message that asks the user whether to resume the download.
437 ESettingsLaunchCustomMessageId, ///< Reserved for future use.
438 ESettingsBackList, ///< Reserved for future use.
439 ESettingsAutoRefresh, ///< Reserved for future use.
441 * If set, the browser encodes URLs using UTF-8 instead of
442 * the original content encoding.
443 * @attention This is recommended only for the APAC region.
445 ESettingsBrowserUtf8Encoding,
446 ESettingsAutoFormFillEnabled, ///< For enabling the auto fill
447 ESettingsSavedPage, ///< Save the page
449 ESettingsAutoOpenDownloads, // For automatically open the downloaded files
450 ESettingsDisableFlash, ///<Enable/Disable the flash
451 ESettingsScriptLog, /// script log
453 * Toolbar buttons configuration settings
455 ESettingsToolbarOnOff,
456 ESettingsToolbarButton1Cmd,
457 ESettingsToolbarButton2Cmd,
458 ESettingsToolbarButton3Cmd,
459 ESettingsToolbarButton4Cmd,
460 ESettingsToolbarButton5Cmd,
461 ESettingsToolbarButton6Cmd,
462 ESettingsToolbarButton7Cmd,
464 * Browser Zoom level configuration settings
466 ESettingsZoomLevelMin, ///< Minimum Zoom level supported
467 ESettingsZoomLevelMax, ///< Maximum Zoom level supported
468 ESettingsZoomLevelDefault, ///< Default Zoom level for new page
469 ESettingsMaxEnum ///< Must be last one
473 * The size of the font selected.
475 enum TBrCtlFontSizeLevel
478 * Text is shown 40% smaller than its declared size.
480 EFontSizeLevelAllSmall = 0,
482 * Text is shown 20% smaller than its declared size.
484 EFontSizeLevelSmaller,
486 * Text is shown as its declared size.
488 EFontSizeLevelNormal,
490 * Text is shown 20% larger than its declared size.
492 EFontSizeLevelLarger,
494 * Text is shown 40% larger than its declared size.
496 EFontSizeLevelAllLarge
499 * Configuration options for the Browser Control
501 enum TBrCtlCapabilities
504 * Displays horizontal and vertical scroll bars.
506 ECapabilityDisplayScrollBar = 0x0001,
508 * Sends request to load embedded content to the host application.
509 * The host application indicates whether or not the load request
512 ECapabilityClientResolveEmbeddedURL = 0x0002,
514 * Sends request to load a URL to the host application.
515 * The host application indicates whether or not the load
516 * request should proceed.
518 ECapabilityClientNotifyURL = 0x0004,
520 * Disables input boxes and Netscape plug-ins.
522 ECapabilityDisableInputAndPlugins = 0x0008,
524 * Adds Find Item to the Options menu.
526 ECapabilityFindItem = 0x0010,
528 * Allows network access for HTTP requests.
529 * If this option is not set, HTTP requests will fail.
531 ECapabilityLoadHttpFw = 0x0020,
533 * Employs the Download Manager to download content, such as audio or video files.
535 ECapabilityUseDlMgr = 0x0040,
537 * Launches a viewer application to view the downloaded content.
539 ECapabilityLaunchViewer = 0x0080,
540 ECapabilityGraphicalHistory = 0x0100, ///< Reserved for future use.
541 ECapabilitySavedPage = 0x0200, ///< Reserved for future use.
542 ECapabilityConfirmDownloads = 0x0400, ///< Enables confirmation dialog in the Download Manager.
543 ECapabilityAutoFormFill = 0x0800,
544 ECapabilityCursorNavigation = 0x1000,
545 ECapabilityGraphicalPage = 0x2000,
546 ECapabilityAccessKeys = 0x4000,
547 ECapabilityFavicon = 0x8000,
548 ECapabilityToolBar = 0x00010000,
549 ECapabilityWebKitLite = 0x00020000,
550 ECapabilityFitToScreen = 0x00040000
554 * Gets the requested page information.
558 EPageInfoTitle = 0, ///< Page title, if a title was specified
559 EPageInfoUrl, ///< URL of the current page
560 EPageInfoContent, ///< Page content as a text buffer
561 EPageInfoSavedPage, ///< Page content, including all embedded content, as a buffer
562 EPageInfoFocusedNodeUrl //< URL of the focused link. The function leaves if the focus is not on an anchor or imagemap
565 * Indicates whether the browser is in Image Map view.
571 * only state change that can be observed is in and out of Image Map view.
573 EStateImageMapView = 0,
574 EStateHistoryView, ///< For future use
575 EStateThumbnailView, ///< For future use
576 EStateWmlView, ///< For WML view
577 EStateSmartTextView, ///< For Smart text recognition mode
578 EStateToolBarMode, ///< For toolbar
581 EStateZoomSliderMode, ///< For ZoomSlider
582 EStateFullscreenBrowsing, ///< For entering/escaping fullscreen browsing
583 EStateHistoryBeginning,
585 EStateSynchRequestMode, ///< For synchronous (XHR) requests
586 EStatePluginFullScreen
589 * Type of the focused element.
591 enum TBrCtlElementType
593 EElementNone = 0, ///< No element is present.
594 EElementImageBox, ///< Box containing an image.
596 * Element used to create either of the following:
597 * A link to another document
598 * A bookmark within a document
601 EElementTelAnchor, ///< Anchor with a "tel:" scheme
602 EElementMailtoAnchor, ///< Anchor with a "mailto:" scheme
603 EElementInputBox, ///< Input box that can be selected and activated.
604 EElementActivatedInputBox, ///< Input box that contains an entry field into which the user can type.
606 * Box that contains a list of items. The user
607 * can select one of the items by clicking it.
611 * Push button that can contain text or images. For example, Submit.
614 EElementTextAreaBox, ///< Input box that contains more than one line.
615 EElementRootBox, ///< Root of the document.
616 EElementObjectBox, ///< Placeholder for a plug-in that has not yet been downloaded.
618 * Box containing a plug-in that the user can
619 * manipulate; for example, by navigating links.
621 EElementActivatedObjectBox,
622 EElementDownloadedObjectBox, ///< Plug-in that is present but is not being manipulated.
623 EElementFileSelectionBoxNoContent, ///< File-browsing box in which no file is selected.
624 EElementFileSelectionBoxWithContent, ///< File-browsing box in which a file was selected previously.
625 EElementAreaBox, ///< Image map.
626 EElementCheckBoxChecked, ///< A check box that was selected.
627 EElementCheckBoxUnChecked, ///< A check box that was not selected.
628 EElementRadioButtonSelected, ///< A radio button that was selected.
629 EElementRadioButtonUnSelected, ///< A radio button that was not selected.
631 EElementMouseButtonListener, ///< A Mouse button listener
632 EElementScrollBar, ///< A scroll bar
634 EElementSmartLinkTel, ///< A telephone number in the page.
635 EElementSmartLinkEmail, ///< an email address in the page.
636 EElementBrokenImage, ///< A missing image
637 EElementSmartLinkVoip, ///< A voip smartlink
638 EElementSelectMultiBox ///< A select box with multiple select
642 * Identifies the navigation direction
644 enum TBrCtlNavigationDirection
646 ENavigationBack, ///< Navigate to the previous page
647 ENavigationForward ///< Navigate to the next page
651 * Returns information about the version of the Browser Control.
653 enum TBrCtlVersionInfo
655 EVersionInfoName = 0, ///< Name of the Browser Control
656 EVersionInfoVersion, ///< Version of the Browser Control
657 EVersionInfoBuild, ///< Build of the Browser Control
658 EBrowserVersion ///< Browser Version
662 * Returns information about the version of the Browser Control.
666 EParamsUnknown = -1, ///< Not used
668 * List of content types that do not use the Download Manager
670 EParamsSelfDownoadableTypes = 0,
672 * List of headers that the Browser Control should add to each request
674 EParamsRequestHeaders,
675 EParamsMax ///< Not used
679 * Reserved for future use
681 enum TBrCtlFindResponse
683 EFindNoMatches = 0, ///< Reserved for future use
684 EFindWrapAround, ///< Reserved for future use
685 EFindAllMatches, ///< Reserved for future use
686 EFindMatch ///< Reserved for future use
690 * Specifies the type of method to call to fetch a URL.
691 * The MbrCtlWindowObserver employs this method.
696 * Get method should be used to fetch content from a URL
700 * POST method should be used to fetch content from a URL
705 * Commands sent by the host application
706 * to the Browser Control by calling the HandleDownloadCommandL function.
708 enum TBrCtlDownloadCmd
711 * Pauses the download identified
712 * by the aTransId parameter of the HandleDownloadCommandL function.
716 * Resumes the download identified by
717 * the aTransId parameter of the HandleDownloadCommandL function.
721 * Cancels the download identified by the
722 * aTransId parameter of the HandleDownloadCommandL function.
726 * Notifies the Download Manager that the download is progressive.
727 * This means that the file can be played while the download is in progress.
729 EDownloadCmdMarkAsProgressive,
731 * Notifies the Download Manager that the download is not progressive.
732 * This means that the file cannot be played while the download is in progress.
734 EDownloadCmdMarkAsNotProgressive
737 enum TBrCtlBitmapInfo
739 EBitmapThumbnail = 0,
744 * The client commands.
746 enum TBrCtlClientCommands
748 EClientCommandLaunchFindKeyword = 0,
749 EClientCommandSubscribeToFeeds,
750 EClientCommandShowContextMenu,
751 EClientCommandToolbarSettings,
752 EClientCommandGotoWebAddress,
753 EClientCommandManageBookmarks,
754 EClientCommandSaveAsBookmark,
755 EClientCommandZoomIn,
756 EClientCommandZoomOut,
757 EClientCommandGoToHompage,
758 EClientCommandRotateScreen,
759 EClientCommandSavePage,
760 EClientCommandSwitchWindow,
761 EClientCommandShowHelp,
762 EClientCommandToolbarConfigure,
763 EClientCommandToolbarShowKeymap,
764 EClientCommandFullScreen,
765 EClientCommandZoomMode
771 enum TBrCtlWidgetParams
773 EWidgetIdentifier = 0,
780 * Orientation for rotating display
782 enum TBrCtlOrientation
784 EOrientationUndefined = 0,
785 EOrientationLandscape,
790 * How to notify javascript logs.
795 * script log output disabled
799 * script log output to a log file
803 * script log output to GUI console
807 * script log output to both GUI console and file
809 EScriptLogToConsoleFile
816 EFormDataPlusPassword
820 #endif // BRCTLDEFS_H