X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fafb-migration-to-binding-v3.md;h=4a8096d7335d33b4bd3b44c149a62e14d37f33e6;hb=f3d1f19ae308cc0559728c0ccf6281cbce5ee37c;hp=501c79fa32e740087b1755a4f7ba10626269653b;hpb=809176909e8efde965a4053c7b2c74150b759f81;p=src%2Fapp-framework-binder.git diff --git a/docs/afb-migration-to-binding-v3.md b/docs/afb-migration-to-binding-v3.md index 501c79fa..4a8096d7 100644 --- a/docs/afb-migration-to-binding-v3.md +++ b/docs/afb-migration-to-binding-v3.md @@ -6,12 +6,12 @@ for the following reasons: - integration of the security requirements within the bindings - simplification of the API (after developer feedbacks) -- removal of obscure features, cleanup +- removal of obscure features and cleanup The ***binder*** can run ***bindings*** v1, v2 and/or v3 in any combination. Thus moving from v1 or v2 to v3 is not enforced at this time. But ... -In the face to face meeting of Karlsruhe it was decided to remove support +In the face to face meeting in Karlsruhe it was decided to remove support of bindings v1 and to deprecate the use of bindings v2. So at the end, **IT IS HIGHLY NEEDED TO SWITCH TO VERSION 3** @@ -19,7 +19,7 @@ So at the end, **IT IS HIGHLY NEEDED TO SWITCH TO VERSION 3** This guide covers the migration of bindings from version 2 to version 3. The migration from version 1 is not treated here because bindings version 1 -are very old and probably does not exist anymore. If needed you can refer +are very old and probably do not exist anymore. If needed you can refer to the old [guide to migrate bindings from v1 to v2](legacy/afb-migration-v1-to-v2.html). @@ -91,12 +91,16 @@ you want to upgrade. It can be done using **curl** and applied using **sed** as below. ```bash -BASE=https://git.automotivelinux.org/src/app-framework-binder/tree +BASE=https://git.automotivelinux.org/src/app-framework-binder/plain SED=migration-to-binding-v3.sed curl -o $SED $BASE/docs/$SED sed -i -f $SED file1 file2 file3... ``` +You can also follow +[this link](https://git.automotivelinux.org/src/app-framework-binder/plain/docs/migration-to-binding-v3.sed) +and save the file. + This automatic action does most of the boring job but not all the job. The remaining of this guide explains the missing part. @@ -173,8 +177,18 @@ of the context and event subscriptions. The new design allows you to specify: - whether the caller or the service or both or none will receive the eventually events during the subcall. -See [calls](reference-v3/func-api/#calls-and-job-functions) and -[subcalls](reference-v3/func-req/#subcall-functions). +See [calls](reference-v3/func-api.html#calls-and-job-functions) and +[subcalls](reference-v3/func-req.html#subcall-functions). + +The table below list the changes to apply: + +| Name in Version 2 | New name of Version 3 +|:----------------------:|:----------------------------------------------------: +| afb_req_subcall | afb_req_subcall_legacy +| afb_req_subcall_sync | afb_req_subcall_sync_legacy +| afb_service_call | afb_service_call_legacy +| afb_service_call_sync | afb_service_call_sync_legacy +| afb_req_subcall_req | afb_req_subcall_req (same but obsolete) Consider use of event handlers @@ -183,4 +197,4 @@ Consider use of event handlers Binding V3 brings new ways of handling event in services. You can register functions that will handle specific events and that accept closure arguments. -See [**afb_api_event_handler_add** and **afb_api_event_handler_del**](reference-v3/func-api/#event-functions) +See [**afb_api_event_handler_add** and **afb_api_event_handler_del**](reference-v3/func-api.html#event-functions)