You are on page 1of 31

EUROGICIEL Ingnierie

Wayland Web Browser Widi Miracast


Version: 2.0

Your contacts
All information and additional information can be obtained from the following person: COMMERCIAL Patrick LEPRINCE is Responsible for the contractual and financial aspects. He has the authority to negotiate the financial terms with the Client. Phone : +33 (0)6 13 18 07 41 Fax : +33 (0)2 51 13 94 38 E-mail : patrick.leprince@eurogiciel.fr
06.13.18.07.41

02.51.13.94.38 patrick.leprince@eurogiciel.fr

TECHNIQUAL LEADER
Julien LE METAYER technical leader for Eurogiciel west 02.28.23.20.25

02.51.13.94.38 julien.lemetayer@eurogiciel.fr

QUALITY INSURANCE
Catherine SACCOCCINI is Responsible for quality insurance. 05.61.00.79.96

05.61.39.01.15 catherine.saccoccini@eurogiciel.fr

SOMMAIRE
1.Introduction.............................................................................................................. 5 1.1.Wayland.................................................................................................................................... 5 1.2.Web Browser Webkit/QT5/Wayland and frameworks.................................................................6 2.List of functionalities................................................................................................. 8 3.DEFINITION............................................................................................................... 9 3.1.Widget....................................................................................................................................... 9 3.2.Identifier.................................................................................................................................... 9 3.3.Event.......................................................................................................................................... 9 3.4.Components............................................................................................................................... 9 4.WIDI/MIracast.......................................................................................................... 10 5.Virtual keyBoard...................................................................................................... 11 6.Audio/Video Management ........................................................................................12 6.1.Video management in the browser..........................................................................................12 6.2.Flash support........................................................................................................................... 12 7.Test ToolS................................................................................................................ 13 7.1.API Test tool............................................................................................................................. 13 7.2.Event test tool.......................................................................................................................... 13 7.3.External API Test tool............................................................................................................... 13 8.Files to be included to use the API............................................................................14 9.Architecture............................................................................................................ 15 1Communication Architecture....................................................................................................... 15 9.1.0MQ......................................................................................................................................... 15 9.2.RPZC........................................................................................................................................ 16 10.TEST Software....................................................................................................... 17 11.Web browser API................................................................................................... 18 11.1.newWidgetFullScreen ............................................................................................................ 18 11.2.newWidget............................................................................................................................. 18 11.3.newComponent...................................................................................................................... 18 11.4.deleteWidget.......................................................................................................................... 19 11.5.setPositionAbsolute................................................................................................................ 19 11.6.setSizeAbsolute...................................................................................................................... 20 11.7.setVisibility............................................................................................................................. 20 11.8.setOpacity.............................................................................................................................. 20 11.9.setLocationBarVisibility.......................................................................................................... 21

11.10.setHistoryNavigationVisibility............................................................................................... 21 11.11.setMenuVisibility.................................................................................................................. 21 11.12.setFullScreen........................................................................................................................ 22 11.13.setURL.................................................................................................................................. 22 11.14.setCursorAbsolute................................................................................................................ 22 11.15.setCursorRelative................................................................................................................. 22 11.16.setCursorState..................................................................................................................... 23 11.17.clickCursorAbsolute.............................................................................................................. 23 11.18.clickCursorRelative............................................................................................................... 23 11.19.sendKey............................................................................................................................... 24 11.20.sendUTF8Char...................................................................................................................... 24 11.21.setFocus............................................................................................................................... 24 11.22.deleteUserData.................................................................................................................... 25 11.23.isLoaded............................................................................................................................... 25 11.24.notifyEvent........................................................................................................................... 25 11.25.registerOnEvent................................................................................................................... 26 11.26.unregisterEvent.................................................................................................................... 26 11.27.subscribeToEventService...................................................................................................... 27 11.28.unsubscribeFromEventService............................................................................................. 27 11.29.startWidi.............................................................................................................................. 27 11.30.stopWidi............................................................................................................................... 27 12.ERRORS CODES...................................................................................................... 28 13.define in apiDefines.h............................................................................................ 29

1.

INTRODUCTION

Eurogiciel provides 3 modules that is preintegrated and optimized for Intel/SDK (Buildroot). The modules are:

A windows manager/compositer Wayland/Weston windows manager compositer optimized and HW accelerated for Intel CE. This modules can be integrated with different tool kits : QT5 EFL Gnome Clutter A web browser/widget based on Wayland/QT5 with optimization to speed up webkit on Intel CE architecture. This module includes an API allowing to integrated it in embedded system without mouse and external keyboard. A Widi/Miracast module. This module includes an API that allows a simple integration with the middleware

1.1.

Wayland

Wayland: Wayland is a protocol for a compositor to talk to its client. Wayland could be a better approach than X for embedded system Wayland consists A protocol A reference implementation named Weston Why Wayland?

Fast Boot time Small Footprint Stable Supported by X community Compositor and windows manager in same SW Flexible (easy to customized) Lots of Functionalities Windows management Native zoom Transparency management Virtual keyboard Rotation control Multiple workspace management

Our implementation:

1.2.

Web Browser Webkit/QT5/Wayland and frameworks

Why QT5/Webkit2? WebKit2 : split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process from the application UI. QTwebKit for Qt5 should be the best foundation for great web browsers. Support of Wayland Applications framework Multiple HTML5/CSS3 Widget creation and management Example of use cases, a weather forecast information, face book notification Full screen browser QML applications: easy for designer QT applications

With our solution, we have a very Low CPU usage using HW acceleration
Application can use openGL ES to accelerate its surface creation Weston uses openGL ES to compose all the applications surfaces Example of performance: fulll screen browser rendering 3D HTML5/CSS3 Intel Sodaville chipset for STB 15 % of CPU Intel Berryville chipset for STB 2 % of CPU

2.

LIST OF FUNCTIONALITIES

Widget creation/deletion newWidgetFullScreen newWidget deleteWidget newComponent (not use par MW for the moment) Widget properties management setPositionAbsolute setSizeAbsolute setVisibility setOpacity setFocus setFullScreen Toolbar management setLocationBarVisibility setHistoryNavigationVisibility setMenuVisibility URL management setURL isLoaded User data management deleteUserData Cursor management setCursorAbsolute setCursorRelative setCursorState clickCursorAbsolute clickCursorRelative key management sendKey sendUTF8Char Event management registerOnEvent unregisterEvent subscribeToEventService unsubscribeFromEventService notifyEvent Widi/Miracast (if included) startWidi stopWidi

3. DEFINITION
3.1. Widget
A widget is an instance of browser. Tools bar could be added to the widget: History location

Properties: Size Position Opacity visibility

3.2. Identifier
Each widget is controlled by an identifier that is provided at widget creation.

3.3. Event
Some functionnalities like Widi/Miracast, Video selection in a web page uses asynchronous notifications. The MW can put a call back function to be notified on a given EVENTCATEGORY/EVENTID Example or use: when a user clique on a video on the browser, the MW can be notified on this event and f the associated URI. The MW can select for such service a couple EVENTCATEGORY/EVENTID = EV_VIDEO/ VIDEO_EV_URI

3.4. Components
This is used internally for Virtual keyBoard and reserve for future used.

4. WIDI/MIRACAST
On optional module Miracat/Widi could be added. This API Allows to control this module.

5.

VIRTUAL KEYBOARD
The Browser includes a virtual Keyboard. According to the customer needs, this keyboard could be added or not. When a input text is selected, the widget that have the focus is moved to the center of the screen and the other widget are hidden. When the text is entered all the widget are relocated to their previous locations. This mechanism is more ergonomic. A detailler... Pourrait-on le rendre par la suite activable au niveau API ? Comment on l'active et le dsactive actuellement Ce mechanism est-il dsactivable

6.

AUDIO/VIDEO MANAGEMENT
6.1. Video management in the browser

It consists of adding a patch for webkit which adds a new media player implementation that catches the video URI and sends it to the api that will forward it to your client application. The media player also displays instructions for the user if no still frame is available in the html code, or if this is an unsupported WebM format (like most youtube videos), and also tells that the video is loading after clicking on play button (this is where you should hide the browser and give to the media player the URI for full screen decoding).

6.2. Flash support


Flash is not supported by default A company has an agreement with adobe to integrated this plugin company name : Triple Play Integration, a Symphony Teleca Company. What they are providing : Flash plugin integration is provided for a fixed price of US$ 30,000 per device profile (a profile is defined as a distinct STB model with a specific PR version and WebKit based browser version)

This release generally takes 1 calendar month to complete. 2 When the customer is ready to deploy Flash Player, the company TPI (Triple Play Integration), is authorized by Adobe to resell the required run time licenses . In quantities less than 50,000 units the price of the license, per unit, is US$ 1.75 . Prices decrease for greater quantities purchased at the same time. 3 If the customer requires continuing support (that is, supporting a new WebKit browser on existing profile that TPI has already provided), this may be purchased at our hourly support rate of US$ 137.50 per man-hour.

7. TEST TOOLS
To test tools are available the different API, two Test tools are provided.
7.1. API Test tool

A mettre a jour
7.2. Event test tool

A voir si ce qui est dessous est a ajouter (outils de test). Il faut principalement expliquer ce que fait notre outils de test. + mettre a jour la variable LOCATEL_RPCZ_CHANNEL qui a t a priori remplac par une variable plus gnrique. You can catch the events sent by Widi or video with the application "testEventClient" running on your PC. See below the steps in the buildroot folder before starting Widi :
$ cd ./package/webbrowser-api/src/test/.libs $ export LOCATEL_RPCZ_CHANNEL=tcp://<stb_ip>:5555 $ ./testEventClient -url tcp://<pc_ip>:5557 -category 1

use "-category 1" to catch the widi events (EV_WIDI) and "-category 0" to catch the video events (EV_VIDEO) when you will received an event, you will have (for example) the following traces :
>EventServiceLocal::notify Received event notification Received widi event with data EventServiceLocal::notify Received event notification 1 Received widi event with data 84620828 EventServiceLocal::notify Received event notification 1 Received widi event with data EventServiceLocal::notify Received event notification 0 Received widi event with data 2 category 1 category 1 category 1 category 1

In this example, you receive at first the event WIDI_EV_READY (2) Then WIDI_EV_CONNECTING (1) with the pincode 84620828 After entering the pincode on the Nexus, you receive WIDI_EV_CONNECTING (1) And finally WIDI_EV_CONNECTION(0) when the connection is done All the events are defined in the file "apiDefines.h" 7.3. External API Test tool

This tools will be available soons and will allows to access to the API through a TCP network with a tool Gui oriented.

8.

FILES TO BE INCLUDED TO USE THE API

A finaliser To used the browser, you juste need to include the webBrowserApi.h file and link your software with a client API. webBrowserApi.h : all web browser API apiDefines.h: definition of data used by webBrowserApi.h. (automatically included by webBrowserApi.h) Quel .so faut il ajouter comme librairie dynamique

Manque API video et widi

9.

ARCHITECTURE
1 Communication Architecture

Le but est de pouvoir comprendre larchitecture et la modularit

9.1. 0MQ
We use 0MQ for xxxxxxx http://www.zeromq.org/ MQ (also seen as ZeroMQ, 0MQ, zmq) looks like an embeddable networking library but acts like a concurrency framework. It gives you sockets that carry atomic messages across various transports like in-process, inter-process, TCP, and multicast. You can connect sockets N-to-N with patterns like fanout, pub-sub, task distribution, and requestreply. It's fast enough to be the fabric for clustered products. Its asynchronous I/O model gives you scalable multicore applications, built as asynchronous message-processing tasks. It has a score of language APIs and runs on most operating systems. MQ is from iMatix and is LGPLv3 open source

9.2. RPZC
We use RPCZ for xxxxxxx

https://code.google.com/p/rpcz/
RPCZ is a library for writing fast and robust RPC clients and servers that speak Protocol Buffers. RPCZ currently supports writing clients and servers in C++ and Python. More languages may be added in the future. The API offers both asynchronous (callbacks) and synchronous (blocking) style functionality. Both styles allow specifying deadlines in millisecond resolution. RPCZ is built on top of ZeroMQ for handling the low-level I/O details in a lock-free manner. The Python module is a Cython wrapper around the C++ API. RPCZ has been tested on Ubuntu 11.10 and Mac OS X Lion. I believe it should not be hard to get it to compile on Windows but I have not tried.

10. TEST SOFTWARE


Mettre ici les info sur notre programme de test xxxxxxxxxxxxxxxxxxxxxxx

11. WEB BROWSER API


11.1.newWidgetFullScreen
enum WBRETURNCODES newWidgetFullScreen(const char * url, unsigned long * id);

Creates a new widget in full screen, containing a site designated by the @em url location. By default, the widget is transparent at the creation (visibility propertie is true). @param[in] url The location of the site displayed by the widget. @param[out] id The identifier of the new widget. @return WB_API_SUCCESS If the widget is created. WB_API_ERR_SYSTEM_ERROR If the widget creation failed due to system issues. WB_API_ERR_LOW_ON_MEMORY If the widget creation failed due to lack of memory.

11.2.newWidget
enum WBRETURNCODES newWidget(const char * url, unsigned long x, unsigned long y, unsigned long width, unsigned long height, unsigned long * id); @fn Creates a new widget with @em height and @em width size at the absolute coordinates ( @em x, @em y) on the screen, containing a site designated by the @em url location. The position specified is relative to the top-left corner of the screen, which is (0,0). By default, the widget is transparent at the creation (visibility propertie is true). @param[in] url The location of the site displayed by the widget. @param[in] x The coordinate (pixels) of the top-left screen corner of the widget on the horizontal axis. @param[in] y The coordinate (pixels) of the top-left screen corner of the widget on the vertical axis. @param[in] height The height (pixels) of the widget. @param[in] width The width (pixels) of the widget. @param[in/out] id The identifier of the new widget. @return WB_API_SUCCESS If the widget is created. WB_API_ERR_LOW_ON_MEMORY If the widget creation failed due to lack of memory. WB_API_ERR_SYSTEM_ERROR If widget creation failed due to system issues.

11.3.newComponent
enum WBRETURNCODES newComponent(const char * componentType, unsigned long x, unsigned long y, unsigned long parentID, unsigned long * id); /** * @fn Creates a new component with @em height and @em width size at the absolute coordinates ( @em x, @em y) * on the screen. * The position specified is relative to the top-left corner of the screen, which is (0,0).

* By default, the component is transparent at the creation (visibility propertie is true). * * @param[in] componentType The type of the component to create. * @param[in] x The coordinate (pixels) of the top-left screen corner of the component on the horizontal axis. * @param[in] y The coordinate (pixels) of the top-left screen corner of the component on the vertical axis. * @param[in] parentID The identifier of the parent component (0 if no parent) * @param[in/out] id The identifier of the new component. * @return WB_API_SUCCESS If the component is created. * WB_API_ERR_INVALID_TYPE If the @em type is unknown. * WB_API_ERR_LOW_ON_MEMORY If the component creation failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If component creation failed due to system issues. **/ Cest quoi? componentType : quelle est sa dfinition?

11.4.deleteWidget
enum WBRETURNCODES deleteWidget(unsigned long id); /** * @fn Close the widget identified by its @em id. * * @param[in] id The identifier of the widget. * @return WB_API_SUCCESS If the widget is freed correctly. * WB_API_ERR_INVALID_ID If the @em id is unknown. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.5.setPositionAbsolute
enum WBRETURNCODES setPositionAbsolute(unsigned long id, unsigned long x, unsigned long y); /** * @fn Moves the widget identified by its @em id to the new absolute coordinates (@em x, @em y) on the screen. * * @param[in] id The identifier of the widget. * @param[in] x The new coordinate (pixels) of the top-left screen corner of the widget on the horizontal axis. * @param[in] y The new coordinate (pixels) of the top-left screen corner of the widget on the vertical axis. * @return WB_API_SUCCESS If the moving success. * WB_API_ERR_INVALID_ID If the @em id is unknown.

* WB_API_ERR_INVALID_COORDINATES If the coordinates @em x or @em y are out of screen. * WB_API_ERR_LOW_ON_MEMORY If the moving failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If the moving failed due to system issues. **/

11.6.setSizeAbsolute
enum WBRETURNCODES setSizeAbsolute(unsigned long id, unsigned long width, unsigned long height); /** * @fn Resizes the widget identified by its @em id, with new @em height * and new @em width. * * @param[in] id The identifier of the widget. * @param[in] height The new height (pixels) of the widget. * @param[in] width The new width (pixels) of the widget. * @return WB_API_SUCCESS If the resizing success. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. * WB_API_ERR_INVALID_ID If the @em id is unknown. * WB_API_ERR_INVALID_HEIGHT If the @em height is out of screen or 0. * WB_API_ERR_INVALID_WIDTH If the @em width is out of screen or 0. **/

11.7.setVisibility
enum WBRETURNCODES setVisibility(unsigned long id, bool visible); Displays or Hides the widget on the screen identified by its @em id following the visibility @em visible value. parameters id The identifier of the widget. visible If true, the widget is shown. If false, the widget is hidden. returned values WB_API_SUCCESS If the new displaying success. WB_API_ERR_INVALID_ID If the @em id is unknown. WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. WB_API_ERR_SYSTEM_ERROR If action failed due to system issues.

11.8.setOpacity
enum WBRETURNCODES setOpacity(unsigned long id, unsigned char opacity); /** * @fn Sets the opacity of the widget identified by its @em id

* following the @em opacity value. * * @param[in] id The identifier of the widget. * @param[in] opacity Value between 0 (0% = fully transparent) and 255 (100% = opaque) * @return WB_API_SUCCESS If the new opacity setting success. * WB_API_ERR_INVALID_ID If the @em id is unknown. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. * **/

11.9.setLocationBarVisibility
enum WBRETURNCODES setLocationBarVisibility(unsigned long id, bool visible); /** * @fn Displays or Hides the location bar in the widget identified by its @em id * following the visibility @em visible value. * * @param[in] id The identifier of the widget. * @param[in] visible If true, the location bar is shown. If false the location bar is hidden. * @return WB_API_SUCCESS If the new displaying success. * WB_API_ERR_INVALID_ID If the @em id is unknown. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.10. setHistoryNavigationVisibility
enum WBRETURNCODES setHistoryNavigationVisibility(unsigned long id, bool visible); /** * @fn Displays or Hides the backward/forward buttons in the widget identified by its @em id * following the visibility @em visible value. * The backward/forward buttons are used to navigate in the widget's history. * * @param[in] id The identifier of the widget. * @param[in] visible If true, the backward/forward navigation buttons are shown. If false they are hidden. * @return WB_API_SUCCESS If the new displaying success. * WB_API_ERR_INVALID_ID If the id is unknown. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.11. setMenuVisibility
enum WBRETURNCODES setMenuVisibility(unsigned long id, bool visible); /**

* @fn Displays or Hides the header menu in the widget identified by its @em id * following the visibility @em visible value. * * @param[in] id The identifier of the widget. * @param[in] visible If true, the header menu is shown otherwise it is hidden. * @return WB_API_SUCCESS when the menu was successfully show or hidden. * WB_API_ERR_INVALID_ID If the @em id is unknown. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.12. setFullScreen
enum WBRETURNCODES setFullScreen(unsigned long id); @fn Rezises the widget in full screen, identified by its @em id. @param[in] id The identifier of the widget. @return WB_API_SUCCESS If the resizing success. WB_API_ERR_INVALID_ID If the id is unknown. WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. WB_API_ERR_SYSTEM_ERROR If action failed due to system issues.

11.13. setURL
enum WBRETURNCODES setURL(unsigned long id, const char * url); /** * @fn Sets the location of the site (@em url) displayed by the widget identified by its @em id. * * @param[in] id The identifier of the widget. * @param[in] url The location of the site displayed by the widget. * @return WB_API_SUCCESS If the new location of the site success. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. * WB_API_ERR_INVALID_ID If the @em id is unknown. * WB_API_ERR_INVALID_URL If the @em url is not valid. **/

11.14. setCursorAbsolute
enum WBRETURNCODES setCursorAbsolute(unsigned long x, unsigned long y); /** * @fn Moves the cursor to horizontal @em x and vertical @em y screen axis. The position * specified is relative to the top-left corner of the screen, which is (0,0). * * @param[in] x The coordinate (pixels) of the top-left screen corner of the cursor on the horizontal axis.

* @param[in] y The coordinate (pixels) of the top-left screen corner of the cursor on the vertical axis. * @return WB_API_SUCCESS If the new cursor position success. * WB_API_ERR_INVALID_COORDINATES If the coordinates are out of screen. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.15. setCursorRelative
enum WBRETURNCODES setCursorRelative(unsigned long offsetX, unsigned long offsetY); /** * @fn Moves the cursor to relative horizontal and vertical axis from the current cursor position. The offset * (@em offsetX, @em offsetY) specified is relative to the current cursor position (x,y) of the screen. * * @param[in] offsetX Offset (pixels) of the cursor coordinate on the horizontal axis. * @param[in] offsetY Offset (pixels) of the cursor coordinate on the vertical axis. * @return WB_API_SUCCESS If the new cursor position success. * WB_API_ERR_INVALID_COORDINATES If the coordinates are out of screen. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.16. setCursorState
enum WBRETURNCODES setCursorState(bool enabled); /** * Enable or disable the mouse cursor dependind on @em enabled value. * Disabling the cursor also hides it while enabling the cursor shows it. * When the cursor is disabled: * - any call to setCursorRelative, setCursorAbsolute, clickCursorRelative and clickCursorAbsolute are ignored and have no effect * - if a mouse is connected, its events are also ignored * * @param[in] enabled If true, the mouse cursor is shown otherwise it is hidden. * @return WB_API_SUCCESS when the mouse cursor was successfully show or hidden. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.17. clickCursorAbsolute
enum WBRETURNCODES clickCursorAbsolute(unsigned long x, unsigned long y);

/** * @fn Simulates the cursor click to the absolute coordinates (@em x, @em y). The position * specified is relative to the top-left corner of the screen, which is (0,0). * * @param[in] x The coordinate (pixels) of the top-left screen corner of the cursor on the horizontal axis. * @param[in] y The coordinate (pixels) of the top-left screen corner of the cursor on the vertical axis. * @return WB_API_SUCCESS If the click action success. * WB_API_ERR_INVALID_COORDINATES If the coordinates are out of screen. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.18. clickCursorRelative
enum WBRETURNCODES clickCursorRelative(unsigned long offsetX, unsigned long offsetY); /** * @fn Simulates the cursor click to relative horizontal and vertical axis from the current cursor position. The offset * (@em offsetX, @em offsetY) specified is relative to the current cursor position (x,y) of the screen. * * @param[in] offsetX Offset (pixels) of the cursor coordinate on the horizontal axis. * @param[in] offsetY Offset (pixels) of the cursor coordinate on the vertical axis. * @return WB_API_SUCCESS If the click action success. * WB_API_ERR_INVALID_COORDINATES If the coordinates are out of screen. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.19. sendKey
enum WBRETURNCODES sendKey(unsigned char key); Simulates the sending of keycodes to the currently active widget as if they where typed from the keyboard. @param[in] key Single char keycode. @return WB_API_SUCCESS If the sending of @em key succeed. WB_API_ERR_INVALID_ID If the key is unknown. WB_API_ERR_INVALID_KEY If the key is not allowed. WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. WB_API_ERR_SYSTEM_ERROR If action failed due to system issues.

11.20. sendUTF8Char
enum WBRETURNCODES sendUTF8Char(const char * utf8Char); /** * @fn Simulates the sending of UTF8 characters to the currently active widget. * * @param[in] utf8Char Single character using an utf8 representation . * @return WB_API_SUCCESS If the sending of @em utf8Char succeed. * WB_API_ERR_INVALID_ID If the key is unknown. * WB_API_ERR_INVALID_KEY If the key is not allowed. * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. * WB_API_ERR_VALUE_OUTOFRANGE If the utf8Char value is not handled by the API **/

11.21. setFocus
enum WBRETURNCODES setFocus(unsigned long id); /** * @fn Sets the focus to the specified @em id widget. * * @param[in] id The identifier of the widget. * @return WB_API_SUCCESS If the setting of focus success. * WB_API_ERR_INVALID_ID If the id is unknown * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.22. deleteUserData
enum WBRETURNCODES deleteUserData(); /** * @fn Deletes all personal informations and cookies for all widgets. * * @param[in] id The identifier of the widget. * @return WB_API_SUCCESS If the clear success.when the clear not success * WB_API_ERR_INVALID_ID If the id is unknown * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. * WB_API_ERR_COULD_NOT_DELETE_USERDATA If the clear not success. * **/

11.23. isLoaded
enum WBRETURNCODES isLoaded(unsigned long id);

/** * @fn Checks if the resource requested with setURL is loaded * * @param[in] id The identifier of the widget. * @return WB_API_SUCCESS If the resource loading is finalized * WB_API_INF_NOT_FINALIZED If the resource loading is not finalized * WB_API_ERR_INVALID_ID If the id is unknown * WB_API_ERR_SYSTEM_ERROR If action failed due to system issues. **/

11.24. notifyEvent
enum WBRETURNCODES notifyEvent(enum EVENTCATEGORY category, long eventID, const char * data); Notify an event to the API @param[in] category the event category @param[in] eventID the evendID @param[in] data the data associated to this event. @return WB_API_SUCCESS If the notification succeed WB_API_ERR_INVALID_ID If the eventID is not supported WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory.

11.25. registerOnEvent
enum WBRETURNCODES registerOnEvent(unsigned long subscriberID, enum EVENTCATEGORY category, long eventID, eventCallback callback); /** * @fn Register a callback for a dedicated @em eventID for the @em category chosen. * * @param[in] category the event category * @param[in] eventID the evendID * @param[in] data the data associated to this event. * @return WB_API_SUCCESS when the callback is successfully registered * WB_API_ERR_INVALID_ID If the eventID is not supported * WB_API_ERR_LOW_ON_MEMORY If action failed due to lack of memory. **/ Two kind of event categogy are defined they alow to be notify of event on this given category Video: the event VIDEO_EV_URI notifies that a video as be selected in a web page. The player can then read (or not according to its state) the video in full screen with ????? A voir Widi: allows to be notified on widi/miracast event A voir o sont les API widi de setting de pin code et les API pour rcuprer lurl video typedef void (*eventCallback)(const char * data);

typedef void (*eventsCallback)(long eventID,const char * data); /** @enum categories supported for events */ enum EVENTCATEGORY { EV_VIDEO = 0, /** Video event.*/ EV_WIDI = 1, /** Widi event.*/ }; /** @enum categories supported for events */ enum WIDIEVENTID { WIDI_EV_READY = 2, /** Video event.*/ WIDI_EV_CONNECTING = 1, /** Video event.*/ WIDI_EV_CONNECTION = 0, /** event.*/ WIDI_EV_CONNECTION_FAIL = -1, /** Video event.*/ }; enum VIDEOEVENTID { VIDEO_EV_URI = 0, }; /** Video URI.*/

11.26. unregisterEvent
enum WBRETURNCODES unregisterEvent(unsigned long subscriberID, enum EVENTCATEGORY category, long eventID); Manque API description

11.27. subscribeToEventService
enum WBRETURNCODES subscribeToEventService(unsigned long * subscriberID, const char * rpczUrlString); Manque API description

11.28. unsubscribeFromEventService
enum WBRETURNCODES unsubscribeFromEventService(unsigned long subscriberID); Manque API description

11.29. startWidi
enum WBRETURNCODES startWidi(void); Starts the WIDI service

11.30. stopWidi
enum WBRETURNCODES stopWidi(void);

Stop the WIDI service

12. ERRORS CODES


/** @enum Return error codes for widget API */ enum WBRETURNCODES { WB_API_INF_IGNORED = 1, /** The requested operation was ignored.*/ WB_API_SUCCESS = 0 , /** The requested operation is succed.*/ WB_API_ERR_SYSTEM_ERROR = -1, /** A general error occurred that is not covered by a more specific error code.*/ WB_API_ERR_LOW_ON_MEMORY = -2, /** There is not enough memory.*/ WB_API_ERR_NULL_POINTER = -3, /** a NULL pointer was provided to the API.*/ WB_API_ERR_VALUE_OUTOFRANGE = -10, /** A provided parameter value is out of range.*/ WB_API_ERR_INVALID_ID = -11, /** The requested @em id is unknown.*/ WB_API_ERR_INVALID_OPACITY = -12, /** The requested @em opacity is not valid.*/ WB_API_ERR_INVALID_COORDINATES = -13, /** The requested @em coordinates are out of screen.*/ WB_API_ERR_INVALID_HEIGHT = -14, /** The requested @em height is out of screen.*/ WB_API_ERR_INVALID_WIDTH = -15, /** The requested @em width is out of screen.*/ WB_API_ERR_INVALID_URL = -16, /** The requested @em url is not valid.*/ WB_API_ERR_INVALID_KEY = -17, /** The requested @em key code is not valid.*/ WB_API_ERR_INVALID_TYPE = -18, /** The requested @em type is unknown.*/ WB_API_ERR_COULD_NOT_DELETE_USERDATA = -21 /** The user datas could not be deleted.*/ }; A remettre sous forme textuelle

A prciser a quoi sert et surtout comment se trouve/gre les RPCZ error


/** @def rpcz initialization */ #define RPCZDECLAREDCHANNEL "RPCZ_CHANNEL" #define RPCZDECLAREDTIMEOUT "RPCZ_TIMEOUT" #define RPCZDEFAULTCHANNEL "tcp://127.0.0.1:5555" #define RPCZDEFAULTTIMEOUT 60000 #define RPCZDEFAULTBINDINGURL "tcp://*:5555"

13. DEFINE IN APIDEFINES.H


/** @def rpcz initialization */ #define RPCZDECLAREDCHANNEL "RPCZ_CHANNEL" #define RPCZDECLAREDTIMEOUT "RPCZ_TIMEOUT" #define RPCZDEFAULTCHANNEL "tcp://127.0.0.1:5555" #define RPCZDEFAULTTIMEOUT 60000 #define RPCZDEFAULTBINDINGURL "tcp://*:5555" /** @enum Return error codes for widget API */ enum WBRETURNCODES { WB_API_INF_IGNORED = 1, /** The requested operation was ignored.*/ WB_API_SUCCESS = 0 , /** The requested operation is succed.*/ WB_API_ERR_SYSTEM_ERROR = -1, /** A general error occurred that is not covered by a more specific error code.*/ WB_API_ERR_LOW_ON_MEMORY = -2, /** There is not enough memory.*/ WB_API_ERR_NULL_POINTER = -3, /** a NULL pointer was provided to the API.*/ WB_API_ERR_VALUE_OUTOFRANGE = -10, /** A provided parameter value is out of range.*/ WB_API_ERR_INVALID_ID = -11, /** The requested @em id is unknown.*/ WB_API_ERR_INVALID_OPACITY = -12, /** The requested @em opacity is not valid.*/ WB_API_ERR_INVALID_COORDINATES = -13, /** The requested @em coordinates are out of screen.*/ WB_API_ERR_INVALID_HEIGHT = -14, /** The requested @em height is out of screen.*/ WB_API_ERR_INVALID_WIDTH = -15, /** The requested @em width is out of screen.*/ WB_API_ERR_INVALID_URL = -16, /** The requested @em url is not valid.*/ WB_API_ERR_INVALID_KEY = -17, /** The requested @em key code is not valid.*/ WB_API_ERR_INVALID_TYPE = -18, /** The requested @em type is unknown.*/ WB_API_ERR_COULD_NOT_DELETE_USERDATA = -21 /** The user datas could not be deleted.*/ }; /** @enum categories supported for events */ enum EVENTCATEGORY { EV_VIDEO = 0, /** Video event.*/ EV_WIDI = 1, /** Widi event.*/ }; /** @enum categories supported for events */ enum WIDIEVENTID {

WIDI_EV_READY = 2, WIDI_EV_CONNECTING = 1, WIDI_EV_CONNECTION = 0, WIDI_EV_CONNECTION_FAIL = -1, event.*/ }; enum VIDEOEVENTID { VIDEO_EV_URI = 0, };

/** Video event.*/ /** Video event.*/ /** event.*/ /** Video

/** Video URI.*/

typedef void (*eventCallback)(const char * data); typedef void (*eventsCallback)(long eventID,const char * data);

You might also like