... | ... | @@ -12,7 +12,68 @@ All Rights Reserved. |
|
|
|
|
|
## Introduction
|
|
|
|
|
|
HFCL (HybridOS Foundation Class Library) is a C++ class library. It is derived
|
|
|
HFCL (HybridOS Foundation Class Library) is a C++ class library. As described
|
|
|
in [HybridOS Architecture], the developer can write an HybridOS app by using
|
|
|
HFCL when the device has a low hardware configuration.
|
|
|
|
|
|
HFCL provides APIs to create and manage assets, activities, and services for
|
|
|
your HybridOS app. It also provides the API to extend or customize your own
|
|
|
HVML view types and also a set of built-in view types.
|
|
|
|
|
|
The key features of HFCL are as follows:
|
|
|
|
|
|
* It acts as the framework for the C++ edition of your HybridOS app.
|
|
|
|
|
|
* It manages the local assets (images, fonts, localization text) for your app.
|
|
|
Unlike web app, most assets of an HybridOS app may be loaded from local
|
|
|
file system, or embedded directly into the program executable. HFCL provides
|
|
|
a universal way to manage the local assets.
|
|
|
|
|
|
* It manages the activities of your app. You can launch an activity and
|
|
|
pass an intent to it.
|
|
|
|
|
|
* It manages the services of your app. You can start a service and register
|
|
|
one or more request responders at the specific end points.
|
|
|
|
|
|
* It implements the built-in view types which conform to HVML specification.
|
|
|
|
|
|
## Components of HFCL
|
|
|
|
|
|
The components of HFCL are classified into the following categories:
|
|
|
|
|
|
1. Assets management
|
|
|
|
|
|
1. Activity management
|
|
|
* Activity and intent
|
|
|
* Animation and transition
|
|
|
|
|
|
1. Service management
|
|
|
* WebSocket responder
|
|
|
* HTTP responder
|
|
|
* MQTT service provider
|
|
|
* ...
|
|
|
|
|
|
1. HVML view types
|
|
|
|
|
|
1. System classes
|
|
|
* hiBus event and task management
|
|
|
* SQLite queries
|
|
|
* JSON data
|
|
|
* Asynchronous task management
|
|
|
|
|
|
## Activity and Intent
|
|
|
|
|
|
## Customizing View Types
|
|
|
|
|
|
## Service
|
|
|
|
|
|
To be continued.
|
|
|
|
|
|
------
|
|
|
|
|
|
_The below words are deprecated..._
|
|
|
|
|
|
It is derived
|
|
|
from mGNGUX, a C++ library for MiniGUI. mGNGUX had been used as the foundation
|
|
|
of two MMI (man-machine interface) solutions for feature phones.
|
|
|
|
... | ... | @@ -34,25 +95,6 @@ Therefore, as described in [HybridOS Architecture], we use [HybridOS View Markup |
|
|
Language] and [hiWebKit] to support HVML and render the activities.
|
|
|
|
|
|
HFCL implements the view types for HVML and help the developer to create and
|
|
|
manage resource, activities, and services for HybrdiOS apps. The key features
|
|
|
of HFCL are follow:
|
|
|
|
|
|
* It acts as the framework for the C++ edition of your HybridOS app.
|
|
|
|
|
|
* It manages the resource (images, fonts, l10n text, CSS definitions,
|
|
|
and others assets) for your app. On device, these assets are loaded from disk
|
|
|
or embedded directly into the program image. HFCL provides a universal
|
|
|
way to manage the assets.
|
|
|
|
|
|
* It manages the activites and the services of your app. You can launch
|
|
|
an activity and pass an intent to it.
|
|
|
|
|
|
* It provides a complete set of views which is conformed HVML specification.
|
|
|
|
|
|
* It provides the standard DOM interfaces for your app to manipulate the DOM
|
|
|
tree, including the nodes, the content, the style, and the attributes of them.
|
|
|
|
|
|
* It is the foundation of Hybrid App Engine.
|
|
|
|
|
|
## Resource Assets
|
|
|
|
... | ... | @@ -60,7 +102,7 @@ We treat HVML files, CSS files, JavaScript files, images, and l10n text are |
|
|
all resource assets of a HybridOS apps.
|
|
|
|
|
|
Unlike web browser, for an app running in a device or client, the assets
|
|
|
generally stored locally, either on the filesystem or embedded in the app
|
|
|
generally stored locally, either on the file system or embedded in the app
|
|
|
program image.
|
|
|
|
|
|
HybridOS provides an easy and magic way for developer to define the assets
|
... | ... | @@ -106,38 +148,6 @@ try to load if from the URL specified in the `begin_assets` section. |
|
|
|
|
|
In this way, HFCL will provide a maximal flexibility for the app developers.
|
|
|
|
|
|
## Activity and Intent
|
|
|
|
|
|
## Customized View
|
|
|
|
|
|
## Service
|
|
|
|
|
|
## Components of HFCL
|
|
|
|
|
|
The components of HFCL are classified into the folllowing categories:
|
|
|
|
|
|
1. Activity management
|
|
|
* Resource management
|
|
|
* Define customized HVML view types
|
|
|
* Activity and intent
|
|
|
* Animation and transition
|
|
|
|
|
|
1. Service management
|
|
|
* WebSocket responder
|
|
|
* HTTP responder
|
|
|
* MQTT service provider
|
|
|
* ...
|
|
|
|
|
|
1. System classes
|
|
|
* hiBus event and task management
|
|
|
* SQLite queries
|
|
|
* JSON data
|
|
|
* Async task management
|
|
|
|
|
|
------
|
|
|
|
|
|
_The below words are deprecated..._
|
|
|
|
|
|
For our user list activity, the asset code will look like:
|
|
|
|
|
|
begin_activity(userList, ActivityUserList)
|
... | ... | |