Embedded Software Lab. @ SKKU
73
1
Web Framework
Embedded Software Lab. @ SKKU
73
2
• Web framework– WRT, W3C Web APIs, Supplementary APIs, Device
APIs, UI framework
• Web runtime– Installer, client, core, injected bundle, security,
launchpad
• Web APIs– HTML5+deviceAPI
• Device APIs– Common, content, social, application, system,
communication, Input/Output, UI
• Web view– WebKit, Webkit2, Webkit2/EFL
Contents
Embedded Software Lab. @ SKKU
73
3
• Web application– Using web based technologies– Accessing local device / platform resources– Can be installed on the device
Web Application
Source: Ming Jin , Tizen Web Runtime. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
4
• Web framework– aggregates the Web Runtime along with the W3C API, Device
API, and a UI framework containing widgets derived from jQuery Mobile
Web app on the Web framework
Source: Jaesik Chang , Tizen Webkit For Wearable Devices. Tizen Developer Conference 2014.
Embedded Software Lab. @ SKKU
73
5
• Provides:– Best Web experience with Browser and packaged Web Apps
• Focusing on functionality(HTML5), performance (UI Responsiveness, 2D/3D Acceleration, JS Engine), Standard Compliance(W3C)
• More device feature accessibility through Tizen Device API• jQuery Mobile based Tizen Web UI FW enables easy Web App development
• Consists of:– Web Runtime: Execution environment for packaged Web App– WebView (WebKit2/EFL): JavaScriptCore,
WebCore(HTML5/W3C API implementation), WebKit API
Web framework
Source: Sunil Saxena , Tizen Architecture. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
6
Web Runtime
Embedded Software Lab. @ SKKU
73
7
• Web Runtime– Environment within which all web applications run on Tizen– Package management (installation, update, etc.)– Execution and lifecycle (launching, pause, resume, etc.)– Runtime security (API/network access, sandboxing, etc.)– Device and platform integration(access local device and
platform resources)
Web Runtime on Tizen
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
8Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
9Web Runtimeweb
wrt-installer
wrt-common
wrt-security
wrt src
api_new
view view_module.cpp
web-client
web-launcher
web-launchpad-
daemon
runnable_widget_object.cpp
webkitInjected-bundle
Injected-bundle.cpp
view_logic.cpp
core_module.cpp
wrt-client.cpp
launchpad_src
launchpad.c__real_launch()__normal_fork_exec()__fake_launch_app()__prepare_exec()
WrtClient::WrtClient(), OnStop(), OnCreate(), OnReset()
CoreModule::Init(), Terminate()
Show(), Hide(), Suspend(), Resume(), Prepareview()
ViewLogic(), createWebView(), prepareView(), showWidget(), hideWidget()
Load libraries to Webprocess dynamically
IVewModule class pointing to ViewLogic
wrt-launcher.cpp Display_widget_info(), AttachDB()
wrt-security ace._client.cpp checkFunctionCall()
Embedded Software Lab. @ SKKU
73
10
• WRT Installer– After download is finished, install the resources to the appropriate
directories– Register app to WRT database– Extract content of the package file– Check configuration file– Generate manifest file for interacting with native application– Update SMACK (Simplified Mandatory Access Control Kernel) policy
based on requested privileges
Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
11
• Application install
wrt-installer main()WrtInstaller:
Public DPL::Application
wrt_install_widgetCONTROLLER_POST_EVENT
InstallStepEnum
app.Exec()
InstallerLogic::InstallWidget
JobWidgetInstall::JobWidgetInstallAddTask()
TaskDesktopFile::TaskDesktopFile
TaskDesktopFile::stepCreateExecFile[ln –s /usr/bin/wrt-client {widget-
handle} ]
/wrt.installer.git/src/jobs/widget_install/job_widget_install.cpp
/wrt.installer.git/src/jobs/widget_install/widget_install_context.h
/wrt.installer.git/src/wrt-installer/wrt_installer_api.cpp
Embedded Software Lab. @ SKKU
73
12
• Application launch
wrt-commons
WrtDatabase::Address()
/wrt.installer.git/wrt-commons/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h
GlobalConfig::GetWrtDatabaseFilePath();
Global_config.hGetWrtDatabaseFilePath()
wrt-launchg_dbConnection-
>AttachDatabase();
AUL
aul_launch_app
app_send_cmd
__create_client_socket
AUL
__create_server_sock
ail_package_get_appinfo
launchpad_preloading_preinitializing_daemon
ail
ail_package_get_appinfo
__launchpad_main_loopFork();execv
/opt/apps/org.tizen.webui/bin/
Db: .app_info.db.wrt.db
Embedded Software Lab. @ SKKU
73
13
wrt-clientWrtClient::OnRes
etWrtClient::setSte
pAddstep(&WrtClient::initStep);
Addstep(&Wrtclient::launchStep);AddStep(&WrtClient::finalizeLaunchS
tep);AddStep(&WrtClient::killWidgetStep);DPL::Event::ControllerEventHandler
main()
WrtClient.Exec()
Application::Exec()
appcore_efl_main
__before_loop
appcore_init
wrt-common
app-core
__do_app
Application::app_reset
Aul_launch_argv_handler
app_start_internal
_aul_handler
aul
elm_run();
elementary-1.0ecore_main_loop_begi
n()
Embedded Software Lab. @ SKKU
73
14
wrt-client
wrt-common
WrtClient::setStep
WidgetController
Addstep(&WrtClient::initStep);Addstep(&WrtClient::launchStep);
AddStep(&WrtClient::finalizeLaunchStep);
AddStep(&WrtClient::killWidgetStep);DPL::Event::ControllerEventHandler
<NextStepEvent>::PostEvent(NextStepEvent)
WidgetController::OnEventReceived(WidgetControllerEvents::InitializeEvent
WidgetConrtollerEvents::LaunchWidgetIdEvent
WidgetLogic
Event controll system
Embedded Software Lab. @ SKKU
73
15
wrt-client
elm-webview
webkit-engine
ewk_view_uri_set()
elm_webview_uri_set
m_view->showWidget
ewk_view_reload()
WidgetController::OnEventRecievd
m_widgetLogic.createWidgetModel()
m_view->prepareView
new WidgetViewDataStructure(max win)
new WindowData();
createWindow(pid);
window = elm_win_add();ecore_x_window_prop_property_s
et
elementary
win = ELM_NEW(Elm_Win)leina_list_append(_elm_win_list.win-
>win_obj);
createWebview(m_widgetView);
ViewLogic::prepareWebview
elm_webview_add()
Elementaryelm-webview-1.0.1
wd->webkit = _elm_smart_WebView_add(
)
Embedded Software Lab. @ SKKU
73
16
• WRT Client– Callback related to the life-cycle (launch, resume, pause,
terminate)– When new web application is launched, the system spawns two
processes• UI process; manage the life cycle of an app• Web process; responsible for rendering the web content
Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
17
• WRT Core– Core module
• Initialize the database, prepare information for launching, check network access
– View module• Creation / deletion web view which contain a web application’s content• Control view layer including the capability of show, hide, suspend• Use WebKit and EFL Evas canvas library for view layer
– Resource loading, creation of new web view
• Add custom JS objects to WebKit view to access Tizen device APIs
Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
18
• Runnablewidgetobject– Handle or launch web application at window– Call proper methods at every state changes– Definition of IRunnableWidgetObject interface
• web/wrt/src/api_new/i_runnable_widget_object.h
– Implementation of RunnableWidgetObject• web/wrt/src/api_new/runnable_widget_object.cpp
• ViewLogic– With Webkit and Evas library, geolocation,
notification, plugin function is available
Web core
Embedded Software Lab. @ SKKU
73
19
• IViewModule
Web core
Embedded Software Lab. @ SKKU
73
20
• ViewLogic
Embedded Software Lab. @ SKKU
73
21
• createWebView()
Embedded Software Lab. @ SKKU
73
22
• Injected Bundle– Build a process management mechanism inside the WebKit API
layer– Support additional function to Web Process by loading library
dynamically at startup time like plugin– Unlike plugin, only one shared library can be loaded
Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
23
• WRT Security– Provide sandbox environment– Enforce SMACK rules
• Cannot access the files of another application, system files or features unless it has been granted permission
Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
24
• WRT Launchpad– Preload WebKit and WRT libraries (such as libewebkit2.so, wrt-
client)– Fork a new process (UI process)
Tizen Web Runtime Internal Blocks
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
25
• Since Tizen 2.0– Hosted web app support– Installation / Update flow improvement– WebKit2/EFL– Improvement of launching– Resources encryption / decryption– Web dynamic box support– Support system language change– Privilege-based API security– Process sandboxing
Web Runtime on Tizen
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
26
• Hosted web app– A Web app with all of its resources located on a remote
server– For now, it needs to be packaged with minimal
resources: config.xml, signature(s)
• Restrictions– Start page should be specified in <tizen:content>
extension– All of rendered pages are remote pages– Only W3C/HTML APIs are allowed in remote pages– Created browsing context has the same origin as remote
server origin
Hosted Web App Support
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
27
• Installation Flow– New verification steps introduced
• Higher-level privilege declaration is not allowed• Invalid signature is not allowed
– New installation steps introduced• Resource encryption (if necessary)• Smack rules population
– Deprecated steps• W3C widget P&C <feature> tag checking is ignored (used as Store side
filtering purpose for now)
• Update Flow– Update criteria
• Must have the same Tizen app ID• Must have the same author signature
– Update triggering point• At installation request time, if the request satisfies the “update criteria”
– Update result• Web app data (settings, cookies, local storage etc.) must be preserved
Installation/Update flow improvement
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
28
• Installation / Update Flow
Installation/Update flow
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
29
• Suspend / Resume– By default, webviews will be suspended by WRT when
the Web App goes to background, unless the developer explicitly enables it via <tizen:setting> • Suspended activities include: JavaScript executions, timers,
animations • Even if a webview is not suspended in background, the
painting operations will not happen in background and the backing store will be purged
– When switched to foreground, the suspended webviews will be resumed
WRT – Lifecycle
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
30WRT – Lifecycle
Source: Ming Jin , Tizen Web Runtime. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
31
• Web App Process Model– Each Web app has 1 UI process and 1 web process
• UI process manages lifecycle, and Web process is responsible for rendering
– NPAPI plugins (if any) will run in separate processes
Based on WebKit2/EFL
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
32
• wrt-launchpad– to preload WebKit and WRT libraries
Launching procedure
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
33
• Resources are encrypted during installation / update – Enabled with <tizen:setting encryption=“enable”/>
in config.xml – Web App directory is scanned recursively – Only resources with predefined extensions (html / js
/ css) are encrypted – Information about encrypted resources are stored
in WRT DB • Resources are decrypted at runtime
– UI Process informs Bundle (WebProcess) about the decryption necessity
– Resources are decrypted to base64 string and read by WebKit
Resource Encryption / Decryption
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
34
• Resource Encryption at Install / Update Time
Resource Encryption / Decryption
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
35
• Resource Decryption at Loading Time
Resource Encryption / Decryption
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
36
• Web dynamic box– WRT install WDB at the time when its Web app is installed
(WDB resources are packaged with its Web app)– On uninstallation, WDB resources are removed with its Web
app– Supported sizes: 1x1, 2x1, 2x2– Supports periodic update
Web Dynamic box support
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.https://developer.tizen.org/ko/documentation/ux-guide/basic-interactions/dynamic-box
Embedded Software Lab. @ SKKU
73
37
• Folder-based localization – Web App contents can be localized in file unit according to
W3C Widget P&C specification – The localization requires page reloading, and the localized
contents will only be reflected at next launching time
• Element-based localization – Configuration document can be localized with xml:lang
attribute
• Content-based localization – System locale change event can be listened with Tizen System
Info API – L10n routine needs to be implemented in locale change event
handler
Support system language change
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
38
• Web app (UI/Web process) sandboxing– UID: “app”– GUID: “app”– Process smack label: {PkgID}– Resource smack label: {PkgID}– Smack rules: basic application rules + privilege specific
rules
• Web app private data (e.g., localstorage, indexed db, cookie, etc.) is protected from the rest of system after sandboxing
Process sandboxing
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
39
• Privilege– A predefined collection of privileged APIs that can be
assigned to the application to allow it to call the privileged APIs
– Ex. http://tizen.org/privilege/account.read
• Privilege level– A defined access level for the APIs, based on their influence– Public
• Alarm, application, bluetooth, calendar, call history, contact, file system, message port, messaging, power, push, setting, system, etc.
– Partner• App manager, secure element, system manager, etc.
– Platform• Bluetooth manager, lock manager, package manager, setting
manager, etc.
Privilege-based API security
Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
40
• Access control model– A subset of the JavaScript APIs supported in Tizen are
considered restricted • Restricted refers to any JS function that can access the private data
on a device such as location, contacts, calendar, etc.
– Widgets need authorization to invoke restricted APIs – Permission declarations and authorization:
• Declaration in manifest file: – <feature> element for device APIs – <access> element for network resources
– Authorization: • prompt type decision according to WRT ACE policy user
confirmations
Privilege-based API security
Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
41
• Access Control enforcements– Tizen WRT supports Tizen WebApps and multiple APIs:
W3C APIs, and non-W3C APIs like WebGL and Tizen Web API
– WRT has a multi-process model • WebKit based • Widget instances are executed in separate processes • Provides runtime isolation and allows the system to enforce custom
process-level containment (sandbox) on each instance
– Two levels of access control enforcements • WRT Access Control Engine(ACE): Fine grained access ontrol on JS
APIs • Application Sandbox via SMACK: Process-level containment by the
kernel on system calls
Privilege-based API security
Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
42
• Access Control Engine– Component responsible for Tizen policy management– Evaluates policy per single request– Manages policy and prompt verdict cache
Privilege-based API security
Source: Ming Jin , Tizen Web Runtime. Tizen Developer Conference 2012.
<feature name=http://tizen.org/api/filesystem required=“true”/>
Embedded Software Lab. @ SKKU
73
43
• ACE policy Evaluation
PEP (Policy Enforcement Point) : ACE interface for WRT PIP (Policy Information Point): Responsible for obtaining attribute values from WRT, Resource Information and OS PDP (Policy Decision Point): evaluates policies; Interacts with the user if necessary Policy Translator: Parses policies (XML) Verdict Manager: Responsible for caching the verdicts
Access Control Enforcements
Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
44
• Process Sandbox via SMACK– The SMACK Policy File is updated with the appropriate rules
during the install, update, or uninstall operations, as well as at run-time
– Rules are based on device features (manifest file), user confirmations, and security files (label, permissions for each feature)
Access Control Enforcements
Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.
Widget requests access
to a device feature
ACE System
Return result to WRT
Access is made to a device feature
Linux Kernel SMACKLSM
Check access rights in the SMACK Policy
File
Embedded Software Lab. @ SKKU
73
45
Tizen Web Device API
Embedded Software Lab. @ SKKU
73
46
• W3C API– implements web standards relating to DOM, styles, device, graphics,
media, communication, storage, security, UI, performance, location, and widget
• The Device API – provides advanced logic employing sensors, file I/O, capturing,
telephony, FM radio, speech recognition, HDMI output, and more
Web API support
Source: Tizen Overview and Architecture, Seokjae Jeong, Korea Linux Forum 2012.
Embedded Software Lab. @ SKKU
73
47
• Limitations of standard specifications– Most of them are still working drafts– No full support for the Tizen characteristic
features
• Tizen Web device APIs– Device APIs give the characteristic features of
the Tizen platform– Device APIs have been updated agilely
Why Tizen Web Device APIs?
Source: Tizen – Universal Device Platform, Wonseok Lee, Samsung Electronics.
Embedded Software Lab. @ SKKU
73
48
• Follows W3C specification API style– Numerical constants avoided but string
enumerations used– Most methods are asynchronous– Success and error callback, and constructors used
• Based on standard technologies– Tizen Web device API specifications are written in
WebIDL– Implementation follows the fundamental rule of
ECMAScript 5.1 and W3C WebIDL recommendation (for example, type conversion)
• Defined tizen namespace– All Tizen device APIs exist in the tizen namespace– tizen is the global object to which all Tizen device
APIs are bound
Tizen Web Device APIs Design
Source: Tizen – Universal Device Platform, Wonseok Lee, Samsung Electronics.
Embedded Software Lab. @ SKKU
73
49
• Defined tizen namespace
Tizen Web Device APIs Design
Source: Tizen – Universal Device Platform, Wonseok Lee, Samsung Electronics.
Embedded Software Lab. @ SKKU
73
50Tizen Web Device API Modules
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
51
• Tizen – Provides Tizen’s common functionalities
• Contains object interfaces that are commonly used throughout the other modules
– The tizen object is the topmost object providing the foundations for accessing Tizen device features
Tizen APIs (1/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
52
• Tizen’s common object interfaces – Generic asynchronous callback handling
• Success callback for methods that do not require a return value • Error callback for methods that require an error as input
parameter
• Generic error and exception handling – Tizen APIs throw a WebAPIException object and returns a
WebAPIError object through error callbacks – These follow the style and types of error of DOM4
specification.
• Filters and sort modes – Filters are used to limit query results and compose complex
queries – Generally, filters are used with the find() method in
Calendar, Call History, Contact, Content, and Messaging modules
Tizen APIs (2/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
53
• Alarm – Schedules an application to be launched at a
specific time
• Application – Manages current application (this application) – Manages other applications
• Retrieves information of applications
– Launches other applications • Application control
Application APIs (1/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
54
• Package – Retrieves information of installed packages – Checks the updates of the installed package list – Installs or uninstalls packages – partner privileged
• Data Control – Exchanges specific data with the data control provider
application • Data control provider application can be implemented as a
native application – Data control types:
• SqlDataControl– SQL-type data control – data consists of rows and columns
• MapDataControl– key-value-type data control
– partner privileged
Application APIs (2/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
55
• Bluetooth – Manages Bluetooth devices – Discovers nearby devices, and bonds or pairs with
found devices – Connects to devices to exchange data with them
• NFC – Manages NFC devices – Detects NFC tag and peer – Exchanges NDEF data
• Messaging – Sends or receives SMS, MMS, or email messages – Retrieves the message storage
Communication APIs (1/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
56
• Network Bearer Selection – Sets a network bearer for a specific IP address or
domain name – partner privileged
• Secure Element – Provides functionality to communicate with applications
in several secure elements, such as UICC/SIM, embedded Secure Element, or Secure SD card
– partner privileged
• Push – Receives push notifications from the Tizen push server
Communication APIs (2/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
57
• Content – Discovers and manages images, video, music,
and other files – Scans content or directory metadata in the
device and updates the content database – Retrieves content from content database using
filters – Browses content by getting a list of content
directories – Views and edits content item details
Content APIs (1/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
58
• Download – Downloads files from a specific URL – Enables applications to manage download
operation details • Sets the stored location of a downloaded file • Sets the network type: cellular, Wi-Fi, or default• Get operation status: current received size and
events • Gets the file MIME type
Content APIs (2/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
59
• Filesystem – Accesses the file system virtual root locations
• Documents, downloads, images, music, videos, ringtones, wgt-package, wgt-private, and wgt-private-tmp
– Manages file storage • Internal and external • Mounted, removed, or unmountable
– Accesses files and directories – Creates, reads, edits or deletes files and
directories
• Message Port – Communicates with other applications: IPC based
on application ID
Input/Output APIs
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
60
• Contact – Manages contacts in device address books
• Including adding, searching, updating, and deleting
– Manages persons • Person is the aggregation of one or more contacts
that are the information of the same person
– Supports vCard 3.0
Social APIs (1/3)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
61
• Calendar – Manages events and tasks
• Including adding, searching, updating, and deleting • Each event or task has a series of attributes, such as
purpose, starting time, and duration
– Monitors the changes in events and tasks – Supports iCalendar v2.0, based on RFC 5545
• Call History – Browses the call history of a device – Removes call history entries – Monitors changes
Social APIs (2/3)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
62
• Bookmark – Manages bookmarks and bookmark folders – Browses bookmark folders – platform privileged
• Data Synchronization – Synchronizes device data to the server using
the OMA DS 1.2 protocol • Contact data or calendar data
– Manages the OMS DS profile slots • Tizen platform sets a limitation on the number of
supported profiles • Adds, updates and removes profiles
Social APIs (3/3)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
63
• Time – Provides TZDate type that is an extended type of
ECMAScript date • It contains the time zone information as well as time
information
– Provides utility functions for managing system time and duration • Methods for getting local time or time zone • Methods for calculating time duration
• System Information – Enables access various properties of the system
• Bluetooth, NFC, Wi-Fi, Front/back Camera, Flash, GPS, Sensors, Platform and API version, USB host/accessory
– Monitors the change of system information
System APIs (1/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
64
• System Setting – Sets or gets the system setting values
• HOME_SCREEN: Home screen background image • LOCK_SCREEN: Lock screen background image • INCOMING_CALL: incoming call ringtone • NOTIFICATION_EMAIL: email notification alert tone
• Power – Manages the power state for the screen resource
• Sets or gets the state of the screen: off, dim, normal, or bright
• Monitors the changes in the state of the screen
– Sets the CPU not to sleep
System APIs (2/2)
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
65
• Notification– Posts UI notifications about application events
User Interface APIs
Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.
Embedded Software Lab. @ SKKU
73
66
Webview (Webkit/EFL)
Embedded Software Lab. @ SKKU
73
67
• Browser main components– User interface
• All excluding main window, such as address bar, back/forward button, bookmark menu
– Browser engine• Control actions between User interface and rendering engine• WebKit; Port layer
– Rendering engine• Draw contents
– Networking• Request handle to receive data from server• Different network library for each port
– UI backend• Module to draw widgets like combobox, listbox
– JavaScript interpreter• Parse JavaScript• WebKit; Squalfish Extream
– Data storage• Database to store information like cookie • WebKit; sqlite light
Background
Source: http://gyuyoung.wordpress.com/category/webkit-blink/
Embedded Software Lab. @ SKKU
73
68
• Rendering Engine– Webkit are used in Safari, Chrome, GTK, QT, EFL, etc.
• Basic flow
• WebKit main flow
Background
More detail: https://docs.google.com/presentation/d/1ZRIQbUKw9Tf077odCh66OrrwRIVNLvI_nhLm2Gi__F0/embed?start=false&loop=false&delayms=3000#slide=id.p
Source: http://gyuyoung.wordpress.com/category/webkit-blink/
Embedded Software Lab. @ SKKU
73
69
• Webkit2 based browser and WRT– Since 2.0, tizen is using Webkit2
• Split process model for web content and UI with non-blocking APIs
• UI responsiveness, robustness, security, and better use of multicore CPUs
Webkit1 vs Webkit2
Source: Tizen Overview & Architecture, Alvin Kim, OSCON 2013
Embedded Software Lab. @ SKKU
73
70
• About EFL (Enlightenment Foundation Libraries)– A set of graphical libraries – Provide easy-to-use resources for building rich user interface
based applications
• About the Port– WebKit/EFL is a project aiming at porting WebKit to the
Enlightenment Foundation Libraries– The port shares code with the GTK+ one, as it also use Cairo
for rendering and LibSoup for networking
EFL Port of WebKit
Embedded Software Lab. @ SKKU
73
71
• Webkit2/EFL Based Browser Architecture
Source: Ming Jin , WebKit/EFL & WebKit2/EFL. Tizen Developer Conference 2012.
WebKit2-EFL
Embedded Software Lab. @ SKKU
73
72
• Job distribution across processes– Sensitive touch response in UIprocess– Frequent display update in UIprocess
• 2-stage pipeline of (1)-(5) and (6)
WebKit2-EFL
Source: Ming Jin , WebKit/EFL & WebKit2/EFL. Tizen Developer Conference 2012.
Embedded Software Lab. @ SKKU
73
73
• Tizen Developer Conference– 2012– 2013– 2014
• Linux foundation• Linux forum korea 2012• Others– Naver– Oscon
References
Top Related