X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=doc%2Fafb-application-writing.html;h=f1e89904d515eb947897ab970494e3065840994c;hb=ea682aac623181e6df8555c29cca52697460c22f;hp=7c0278da7fb1eb0aa7a1c360df5c81c3476ca9eb;hpb=0156b1645a201e44d5285c96d32cbfa5a9eb6814;p=src%2Fapp-framework-binder.git diff --git a/doc/afb-application-writing.html b/doc/afb-application-writing.html index 7c0278da..f1e89904 100644 --- a/doc/afb-application-writing.html +++ b/doc/afb-application-writing.html @@ -15,21 +15,28 @@ Author: José Bollo

+ +

Languages for writing Applications

+ -

Writing an HTML5 application

+

Writing an HTML5 application

Developpers of HTML5 applications (client side) can easyly create applications for AGL framework using their prefered @@ -51,7 +58,7 @@ with the current x-afb-json1 protocol.

-

Writing a Qt application

+

Writing a Qt application

Writing Qt applications is also possible because Qt offers APIs to make HTTP queries and to connect using WebSockets.

@@ -66,7 +73,7 @@ a simple “hello world” application in QML -

Writing a C application

+

Writing a C application

C applications can use the binder afb-daemon through a websocket connection.

@@ -85,8 +92,8 @@ and being less dependant of libsystemd.

Handling sessions within applications

- -

Exchanging tokens

+

Applications must be aware of the the features session and token +when they interact with the binder afb-daemon.

Applications are communicating with their binder afb-daemon using a network connection or a kind of network connection (unix domain @@ -95,12 +102,25 @@ Also, HTTP protocol is not a connected protocol. It means that the socket connection can not be used to authenticate a client.

For this reason, the binder should authenticate the application -by using a commonly shared secret named token.

- -

At start, the framework communicate a common secret to both the binder -and its client: the application. When the application

+by using a commonly shared secret named token and the identification +of the client named session.

Handling sessions

+ +

Plugins and features of the binder need to keep track of the client +instances. In principle, a binder afb-daemon is launched by application +instance. But for services, a binder

+ + +

Exchanging tokens

+ +

At start, the framework communicate a common secret to both the binder +and its client: the application. This initial secret is the +initial token.

+ +

For each of its client application, the binder manages a current active +token. The initial token is the default active token. It is the expected +token for new clients.