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
470 * Browser cursor show mode -- some phone doesn't have cursor inside Browser
472 ESettingsCursorShowMode,
475 * Enter key mode - default behavior is like in desktop browser - submit the form
476 * The alternative is to select the link is one is activated.
478 ESettingsEnterKeyMode,
480 ESettingsMaxEnum ///< Must be last one
484 * The size of the font selected.
486 enum TBrCtlFontSizeLevel
489 * Text is shown 40% smaller than its declared size.
491 EFontSizeLevelAllSmall = 0,
493 * Text is shown 20% smaller than its declared size.
495 EFontSizeLevelSmaller,
497 * Text is shown as its declared size.
499 EFontSizeLevelNormal,
501 * Text is shown 20% larger than its declared size.
503 EFontSizeLevelLarger,
505 * Text is shown 40% larger than its declared size.
507 EFontSizeLevelAllLarge
510 * Configuration options for the Browser Control
512 enum TBrCtlCapabilities
515 * Displays horizontal and vertical scroll bars.
517 ECapabilityDisplayScrollBar = 0x0001,
519 * Sends request to load embedded content to the host application.
520 * The host application indicates whether or not the load request
523 ECapabilityClientResolveEmbeddedURL = 0x0002,
525 * Sends request to load a URL to the host application.
526 * The host application indicates whether or not the load
527 * request should proceed.
529 ECapabilityClientNotifyURL = 0x0004,
531 * Disables input boxes and Netscape plug-ins.
533 ECapabilityDisableInputAndPlugins = 0x0008,
535 * Adds Find Item to the Options menu.
537 ECapabilityFindItem = 0x0010,
539 * Allows network access for HTTP requests.
540 * If this option is not set, HTTP requests will fail.
542 ECapabilityLoadHttpFw = 0x0020,
544 * Employs the Download Manager to download content, such as audio or video files.
546 ECapabilityUseDlMgr = 0x0040,
548 * Launches a viewer application to view the downloaded content.
550 ECapabilityLaunchViewer = 0x0080,
551 ECapabilityGraphicalHistory = 0x0100, ///< Reserved for future use.
552 ECapabilitySavedPage = 0x0200, ///< Reserved for future use.
553 ECapabilityConfirmDownloads = 0x0400, ///< Enables confirmation dialog in the Download Manager.
554 ECapabilityAutoFormFill = 0x0800,
555 ECapabilityCursorNavigation = 0x1000,
556 ECapabilityGraphicalPage = 0x2000,
557 ECapabilityAccessKeys = 0x4000,
558 ECapabilityFavicon = 0x8000,
559 ECapabilityToolBar = 0x00010000,
560 ECapabilityWebKitLite = 0x00020000,
561 ECapabilityFitToScreen = 0x00040000
565 * Gets the requested page information.
569 EPageInfoTitle = 0, ///< Page title, if a title was specified
570 EPageInfoUrl, ///< URL of the current page
571 EPageInfoContent, ///< Page content as a text buffer
572 EPageInfoSavedPage, ///< Page content, including all embedded content, as a buffer
573 EPageInfoFocusedNodeUrl //< URL of the focused link. The function leaves if the focus is not on an anchor or imagemap
576 * Indicates whether the browser is in Image Map view.
582 * only state change that can be observed is in and out of Image Map view.
584 EStateImageMapView = 0,
585 EStateHistoryView, ///< For future use
586 EStateThumbnailView, ///< For future use
587 EStateWmlView, ///< For WML view
588 EStateSmartTextView, ///< For Smart text recognition mode
589 EStateToolBarMode, ///< For toolbar
592 EStateZoomSliderMode, ///< For ZoomSlider
593 EStateFullscreenBrowsing, ///< For entering/escaping fullscreen browsing
594 EStateHistoryBeginning,
596 EStateSynchRequestMode, ///< For synchronous (XHR) requests
597 EStatePluginFullScreen
600 * Type of the focused element.
602 enum TBrCtlElementType
604 EElementNone = 0, ///< No element is present.
605 EElementImageBox, ///< Box containing an image.
607 * Element used to create either of the following:
608 * A link to another document
609 * A bookmark within a document
612 EElementTelAnchor, ///< Anchor with a "tel:" scheme
613 EElementMailtoAnchor, ///< Anchor with a "mailto:" scheme
614 EElementInputBox, ///< Input box that can be selected and activated.
615 EElementActivatedInputBox, ///< Input box that contains an entry field into which the user can type.
617 * Box that contains a list of items. The user
618 * can select one of the items by clicking it.
622 * Push button that can contain text or images. For example, Submit.
625 EElementTextAreaBox, ///< Input box that contains more than one line.
626 EElementRootBox, ///< Root of the document.
627 EElementObjectBox, ///< Placeholder for a plug-in that has not yet been downloaded.
629 * Box containing a plug-in that the user can
630 * manipulate; for example, by navigating links.
632 EElementActivatedObjectBox,
633 EElementDownloadedObjectBox, ///< Plug-in that is present but is not being manipulated.
634 EElementFileSelectionBoxNoContent, ///< File-browsing box in which no file is selected.
635 EElementFileSelectionBoxWithContent, ///< File-browsing box in which a file was selected previously.
636 EElementAreaBox, ///< Image map.
637 EElementCheckBoxChecked, ///< A check box that was selected.
638 EElementCheckBoxUnChecked, ///< A check box that was not selected.
639 EElementRadioButtonSelected, ///< A radio button that was selected.
640 EElementRadioButtonUnSelected, ///< A radio button that was not selected.
642 EElementMouseButtonListener, ///< A Mouse button listener
643 EElementScrollBar, ///< A scroll bar
645 EElementSmartLinkTel, ///< A telephone number in the page.
646 EElementSmartLinkEmail, ///< an email address in the page.
647 EElementBrokenImage, ///< A missing image
648 EElementSmartLinkVoip, ///< A voip smartlink
649 EElementSelectMultiBox ///< A select box with multiple select
653 * Identifies the navigation direction
655 enum TBrCtlNavigationDirection
657 ENavigationBack, ///< Navigate to the previous page
658 ENavigationForward ///< Navigate to the next page
662 * Returns information about the version of the Browser Control.
664 enum TBrCtlVersionInfo
666 EVersionInfoName = 0, ///< Name of the Browser Control
667 EVersionInfoVersion, ///< Version of the Browser Control
668 EVersionInfoBuild, ///< Build of the Browser Control
669 EBrowserVersion ///< Browser Version
673 * Returns information about the version of the Browser Control.
677 EParamsUnknown = -1, ///< Not used
679 * List of content types that do not use the Download Manager
681 EParamsSelfDownoadableTypes = 0,
683 * List of headers that the Browser Control should add to each request
685 EParamsRequestHeaders,
686 EParamsMax ///< Not used
690 * Reserved for future use
692 enum TBrCtlFindResponse
694 EFindNoMatches = 0, ///< Reserved for future use
695 EFindWrapAround, ///< Reserved for future use
696 EFindAllMatches, ///< Reserved for future use
697 EFindMatch ///< Reserved for future use
701 * Specifies the type of method to call to fetch a URL.
702 * The MbrCtlWindowObserver employs this method.
707 * Get method should be used to fetch content from a URL
711 * POST method should be used to fetch content from a URL
716 * Commands sent by the host application
717 * to the Browser Control by calling the HandleDownloadCommandL function.
719 enum TBrCtlDownloadCmd
722 * Pauses the download identified
723 * by the aTransId parameter of the HandleDownloadCommandL function.
727 * Resumes the download identified by
728 * the aTransId parameter of the HandleDownloadCommandL function.
732 * Cancels the download identified by the
733 * aTransId parameter of the HandleDownloadCommandL function.
737 * Notifies the Download Manager that the download is progressive.
738 * This means that the file can be played while the download is in progress.
740 EDownloadCmdMarkAsProgressive,
742 * Notifies the Download Manager that the download is not progressive.
743 * This means that the file cannot be played while the download is in progress.
745 EDownloadCmdMarkAsNotProgressive
748 enum TBrCtlBitmapInfo
750 EBitmapThumbnail = 0,
755 * The client commands.
757 enum TBrCtlClientCommands
759 EClientCommandLaunchFindKeyword = 0,
760 EClientCommandSubscribeToFeeds,
761 EClientCommandShowContextMenu,
762 EClientCommandToolbarSettings,
763 EClientCommandGotoWebAddress,
764 EClientCommandManageBookmarks,
765 EClientCommandSaveAsBookmark,
766 EClientCommandZoomIn,
767 EClientCommandZoomOut,
768 EClientCommandGoToHompage,
769 EClientCommandRotateScreen,
770 EClientCommandSavePage,
771 EClientCommandSwitchWindow,
772 EClientCommandShowHelp,
773 EClientCommandToolbarConfigure,
774 EClientCommandToolbarShowKeymap,
775 EClientCommandFullScreen,
776 EClientCommandZoomMode
782 enum TBrCtlWidgetParams
784 EWidgetIdentifier = 0,
792 * Orientation for rotating display
794 enum TBrCtlOrientation
796 EOrientationUndefined = 0,
797 EOrientationLandscape,
802 * How to notify javascript logs.
807 * script log output disabled
811 * script log output to a log file
815 * script log output to GUI console
819 * script log output to both GUI console and file
821 EScriptLogToConsoleFile
828 EFormDataPlusPassword
836 enum TEnterKeySettings
838 EEnterKeyDefault = 0,
839 EEnterKeyCanActivateLink
842 #endif // BRCTLDEFS_H