summaryrefslogtreecommitdiffstats
path: root/halibut_8.0.0.xml
blob: 7e01ce241e4c181621b947c1d649ac1d6cd314d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <!-- remote servers to query -->
  <remote name="agl"
         fetch="https://gerrit.automotivelinux.org/gerrit/"
         review="https://gerrit.automotivelinux.org/gerrit/"
         pushurl="ssh://gerrit.automotivelinux.org:29418"
  />
  <remote name="yocto" fetch="https://git.yoctoproject.org/git/" />
  <remote name="github" fetch="https://github.com/" />

  <!-- defaults -->
  <default remote="agl" sync-j="4" revision="refs/tags/halibut/8.0.0"/>


  <!-- CORE -->
  <!-- use agl revisions/branches here -->

  <!-- AGL things. -->
  <project name="AGL/meta-agl" path="meta-agl" />
  <project name="AGL/meta-agl-cluster-demo" path="meta-agl-cluster-demo" />
  <project name="AGL/meta-agl-demo" path="meta-agl-demo" />
  <project name="AGL/meta-agl-devel" path="meta-agl-devel" />
  <project name="AGL/meta-agl-extra" path="meta-agl-extra" />
  <project name="AGL/meta-agl-telematics-demo" path="meta-agl-telematics-demo" />


  <!-- ALL EXTERNAL REPOS BELOW USE A FIXED REVISION ! -->

  <!-- YOCTO & OE -->

  <!-- Yocto/OpenEmbedded things. -->
  <project name="poky" path="external/poky" remote="yocto" revision="e7f0177ef3b6e06b8bc1722fca0241fef08a1530" upstream="thud" />
  <project name="meta-gplv2" path="external/meta-gplv2" remote="yocto" revision="aabc30f3bd03f97326fb8596910b94639fea7575" upstream="thud" />
  <project name="openembedded/meta-openembedded" path="external/meta-openembedded" remote="github" revision="4cd3a39f22a2712bfa8fc657d09fe2c7765a4005" upstream="thud" />


  <!-- UPSTREAM COMPONENTS -->

  <!-- meta-virtualization -->
  <project name="meta-virtualization" path="external/meta-virtualization" remote="yocto" revision="9e8c0c96b443828a255e7d6ca6291598347672ac" upstream="thud"/>

  <!-- Qt things -->
  <project name="meta-qt5/meta-qt5" path="external/meta-qt5" remote="github" revision="81937713f774d7dea854b22987b3ef1ab1f1cdbe" upstream="thud"/>

  <!-- Updater layers. -->
  <project name="advancedtelematic/meta-updater" path="external/meta-updater" remote="github" revision="2d2e46834af68b1c22ad0a022001c117caa4929c" upstream="thud"/>
  <project name="advancedtelematic/meta-updater-qemux86-64" path="external/meta-updater-qemux86-64" remote="github" revision="214e14c4c45625842e542eebd696f903060d488f" upstream="thud"/>

  <!-- Security layer -->
  <project name="meta-security" path="external/meta-security" remote="yocto" revision="31dc4e7532fa7a82060e0b50e5eb8d0414aa7e93" upstream="thud"/>

  <!-- SmartDeviceLink layer -->
  <project name="phongt/meta-sdl" path="external/meta-sdl" remote="github" revision="ab1e345171e799216b8fcb432943a2de5ff66f5f" upstream="thud"/>

  <!-- meta-spdxscanner - support for fossology -->
  <project name="dl9pf/meta-spdxscanner" path="external/meta-spdxscanner" remote="github" revision="2dd8b88071268a5922696db36a9ba8be96a9e0ef" upstream="master"/>


  <!-- BSPs -->

  <!-- Renesas Gen3 specific things -->
  <project name="AGL/meta-renesas-rcar-gen3" path="bsp/meta-renesas-rcar-gen3" />
  <project name="CogentEmbedded/meta-rcar" path="bsp/meta-rcar" remote="github" revision="5aecbd92ce06c179efa9dca9127c09219018bc4b" upstream="thud-v3.15.0"/>

  <!-- MinnowBoard MAX specific things -->
  <project name="meta-intel" path="bsp/meta-intel" remote="yocto" revision="27dadcfc7bc0de70328b02fecb841608389d22fc" upstream="thud"/>

  <!-- consolidate on meta-freescale from git.yoctoproject.org -->
  <project name="meta-freescale" path="bsp/meta-freescale" remote="yocto" revision="f5c932229c31b612cba38c2ed6f3c3ec6b800e92" upstream="thud"/>
  <project name="Freescale/meta-freescale-3rdparty" path="bsp/meta-freescale-3rdparty" remote="github" revision="c4b5ac6b20e4245ce0630e9197313aaef999a331" upstream="thud"/>

  <!-- Boundary devices bsp layer -->
  <project name="boundarydevices/meta-boundary" path="bsp/meta-boundary" remote="github" revision="4ea73c57f125ff0b8c3e17e5cc5d07b6168bbd6c" upstream="master"/>

  <!-- ti vayu / jacinto 6 / DRA7 -->
  <project name="meta-ti" path="bsp/meta-ti" remote="yocto" revision="2da08ed8b2f4a29fb7d45e769171ea5bb79cf0b2" upstream="thud"/>

  <!-- rpi 2, 3 and 3 B+ -->
  <project name="meta-raspberrypi" path="bsp/meta-raspberrypi" remote="yocto" revision="c71d79efc5a06a0c896c278c94f5b14413bb4d69" upstream="thud"/>

  <!-- DragonBoard 410c specific things -->
  <project name="meta-qcom" path="bsp/meta-qcom" remote="yocto" revision="8ac86cd465d73da78e24620e4695176138d17fc3" upstream="thud"/>

  <!-- Altera SOCFPGA platform -->
  <!-- https://github.com/kraj/meta-altera -->
  <project name="kraj/meta-altera" path="bsp/meta-altera" remote="github" revision="f07030bb6ff2062031e06efe9831b76c7250b32e" upstream="thud"/>

  <!-- Sancloud BSP layers -->
  <project name="SanCloudLtd/meta-sancloud" path="bsp/meta-sancloud" remote="github" revision="9b837baf403ab7c38de2e05e8c3183e1ab54cfd3" upstream="thud"/>
  <project name="EmbeddedAndroid/meta-rtlwifi" path="bsp/meta-rtlwifi" remote="github" revision="fd7ca0ca47c7095ced62a5a7cdef040dff87fb76" upstream="master"/>

  <!-- meta-synopsys - support for ARC HSDK board -->
  <project name="foss-for-synopsys-dwc-arc-processors/meta-synopsys" path="bsp/meta-synopsys" remote="github" revision="702a0e826e87796aefa97abc1de0217d3775fd13" upstream="thud-agl"/>

  
</manifest>
n> const char _install_[] = "install"; static const char _not_found_[] = "not-found"; static const char _once_[] = "once"; static const char _pause_[] = "pause"; static const char _resume_[] = "resume"; static const char _runid_[] = "runid"; static const char _runnables_[] = "runnables"; static const char _runners_[] = "runners"; static const char _start_[] = "start"; static const char _state_[] = "state"; static const char _terminate_[] = "terminate"; static const char _uninstall_[] = "uninstall"; static const char *rootdir = FWK_APP_DIR; static struct afb_event applist_changed_event; static struct afm_udb *afudb; static struct json_object *json_true; static void do_reloads() { /* enforce daemon reload */ systemd_daemon_reload(0); systemd_unit_restart_name(0, "sockets.target"); } static void bad_request(struct afb_req req) { afb_req_fail(req, "bad-request", NULL); } static void not_found(struct afb_req req) { afb_req_fail(req, _not_found_, NULL); } static void cant_start(struct afb_req req) { afb_req_fail(req, "cannot-start", NULL); } /* * Broadcast the event "application-list-changed". * This event is sent was the event "changed" is received from dbus. */ static void application_list_changed(const char *operation, const char *data) { struct json_object *e = NULL; wrap_json_pack(&e, "{ss ss}", "operation", operation, "data", data); afb_event_broadcast(applist_changed_event, e); } /* * retrieves the 'appid' in parameters received with the * request 'req' for the 'method'. * * Returns 1 in case of success. * Otherwise, if the 'appid' can't be retrieved, an error stating * the bad request is replied for 'req' and 0 is returned. */ static int onappid(struct afb_req req, const char *method, const char **appid) { struct json_object *json; /* get the paramaters of the request */ json = afb_req_json(req); /* get the appid if any */ if (!wrap_json_unpack(json, "s", appid) || !wrap_json_unpack(json, "{si}", _id_, appid)) { /* found */ INFO("method %s called for %s", method, *appid); return 1; } /* nothing appropriate */ INFO("bad request method %s: %s", method, json_object_to_json_string(json)); bad_request(req); return 0; } /* * retrieves the 'runid' in parameters received with the * request 'req' for the 'method'. * * Returns 1 in case of success. * Otherwise, if the 'runid' can't be retrieved, an error stating * the bad request is replied for 'req' and 0 is returned. */ static int onrunid(struct afb_req req, const char *method, int *runid) { struct json_object *json; json = afb_req_json(req); if (wrap_json_unpack(json, "i", runid) && wrap_json_unpack(json, "{si}", _runid_, runid)) { INFO("bad request method %s: %s", method, json_object_to_json_string(json)); bad_request(req); return 0; } INFO("method %s called for %d", method, *runid); return 1; } /* * Sends the reply 'resp' to the request 'req' if 'resp' is not NULLzero. * Otherwise, when 'resp' is NULL replies the error string 'errstr'. */ static void reply(struct afb_req req, struct json_object *resp, const char *errstr) { if (!resp) afb_req_fail(req, errstr, NULL); else afb_req_success(req, resp, NULL); } /* * Sends the reply "true" to the request 'req' if 'status' is zero. * Otherwise, when 'status' is not zero replies the error string 'errstr'. */ static void reply_status(struct afb_req req, int status, const char *errstr) { reply(req, status ? NULL : json_object_get(json_true), errstr); } /* * On query "runnables" */ static void runnables(struct afb_req req) { struct json_object *resp; INFO("method runnables called"); resp = afm_udb_applications_public(afudb, afb_req_get_uid(req)); afb_req_success(req, resp, NULL); } /* * On query "detail" */ static void detail(struct afb_req req) { const char *appid; struct json_object *resp; /* scan the request */ if (!onappid(req, _detail_, &appid)) return; /* wants details for appid */ resp = afm_udb_get_application_public(afudb, appid, afb_req_get_uid(req)); if (resp) afb_req_success(req, resp, NULL); else not_found(req); } /* * On query "start" */ static void start(struct afb_req req) { const char *appid; struct json_object *appli, *resp; int runid; /* scan the request */ if (!onappid(req, _start_, &appid)) return; /* get the application */ appli = afm_udb_get_application_private(afudb, appid, afb_req_get_uid(req)); if (appli == NULL) { not_found(req); return; } /* launch the application */ runid = afm_urun_start(appli, afb_req_get_uid(req)); if (runid <= 0) { cant_start(req); return; } /* returns */ resp = NULL; #if 0 wrap_json_pack(&resp, "{si}", _runid_, runid); #else wrap_json_pack(&resp, "i", runid); #endif afb_req_success(req, resp, NULL); } /* * On query "once" */ static void once(struct afb_req req) { const char *appid; struct json_object *appli, *resp; int runid; /* scan the request */ if (!onappid(req, _once_, &appid)) return; /* get the application */ appli = afm_udb_get_application_private(afudb, appid, afb_req_get_uid(req)); if (appli == NULL) { not_found(req); return; } /* launch the application */ runid = afm_urun_once(appli, afb_req_get_uid(req)); if (runid <= 0) { cant_start(req); return; } /* returns the state */ resp = afm_urun_state(afudb, runid, afb_req_get_uid(req)); afb_req_success(req, resp, NULL); } /* * On query "pause" */ static void pause(struct afb_req req) { int runid, status; if (onrunid(req, "pause", &runid)) { status = afm_urun_pause(runid, afb_req_get_uid(req)); reply_status(req, status, _not_found_); } } /* * On query "resume" from 'smsg' with parameters of 'obj'. */ static void resume(struct afb_req req) { int runid, status; if (onrunid(req, "resume", &runid)) { status = afm_urun_resume(runid, afb_req_get_uid(req)); reply_status(req, status, _not_found_); } } /* * On query "terminate" */ static void terminate(struct afb_req req) { int runid, status; if (onrunid(req, "terminate", &runid)) { status = afm_urun_terminate(runid, afb_req_get_uid(req)); reply_status(req, status, _not_found_); } } /* * On query "runners" */ static void runners(struct afb_req req) { struct json_object *resp; INFO("method runners called"); resp = afm_urun_list(afudb, afb_req_get_uid(req)); afb_req_success(req, resp, NULL); } /* * On query "state" */ static void state(struct afb_req req) { int runid; struct json_object *resp; if (onrunid(req, "state", &runid)) { resp = afm_urun_state(afudb, runid, afb_req_get_uid(req)); reply(req, resp, _not_found_); } } static void install(struct afb_req req) { const char *wgtfile; const char *root; int force; int reload; struct wgt_info *ifo; struct json_object *json; struct json_object *resp; /* default settings */ root = rootdir; force = 0; reload = 1; /* scan the request */ json = afb_req_json(req); if (wrap_json_unpack(json, "s", &wgtfile) && wrap_json_unpack(json, "{ss s?s s?b s?b}", "wgt", &wgtfile, "root", &root, "force", &force, "reload", &reload)) { return bad_request(req); } /* install the widget */ ifo = install_widget(wgtfile, root, force); if (ifo == NULL) afb_req_fail_f(req, "failed", "installation failed: %m"); else { afm_udb_update(afudb); /* reload if needed */ if (reload) do_reloads(); /* build the response */ wrap_json_pack(&resp, "{ss}", _added_, wgt_info_desc(ifo)->idaver); afb_req_success(req, resp, NULL); application_list_changed(_install_, wgt_info_desc(ifo)->idaver); /* clean-up */ wgt_info_unref(ifo); } } static void uninstall(struct afb_req req) { const char *idaver; const char *root; struct json_object *json; int rc; /* default settings */ root = rootdir; /* scan the request */ json = afb_req_json(req); if (wrap_json_unpack(json, "s", &idaver) && wrap_json_unpack(json, "{ss s?s}", _id_, &idaver, "root", &root)) { return bad_request(req); } /* install the widget */ rc = uninstall_widget(idaver, root); if (rc) afb_req_fail_f(req, "failed", "uninstallation failed: %m"); else { afm_udb_update(afudb); afb_req_success(req, NULL, NULL); application_list_changed(_uninstall_, idaver); } } static int init() { /* init database */ afudb = afm_udb_create(1, 0, "afm-appli-"); if (!afudb) { ERROR("afm_udb_create failed"); return -1; } /* create TRUE */ json_true = json_object_new_boolean(1); /* create the event */ applist_changed_event = afb_daemon_make_event(_a_l_c_); return -!afb_event_is_valid(applist_changed_event); } static const struct afb_auth auth_install = { .type = afb_auth_Permission, .text = "urn:AGL:permission:afm:system:widget:install" }, auth_uninstall = { .type = afb_auth_Permission, .text = "urn:AGL:permission:afm:system:widget:uninstall" } ; static const struct afb_verb_v2 verbs[] = { {_runnables_, runnables, NULL, "Get list of runnable applications", AFB_SESSION_CHECK_V2 }, {_detail_ , detail, NULL, "Get the details for one application", AFB_SESSION_CHECK_V2 }, {_start_ , start, NULL, "Start an application", AFB_SESSION_CHECK_V2 }, {_once_ , once, NULL, "Start once an application", AFB_SESSION_CHECK_V2 }, {_terminate_, terminate, NULL, "Terminate a running application", AFB_SESSION_CHECK_V2 }, {_pause_ , pause, NULL, "Pause a running application", AFB_SESSION_CHECK_V2 }, {_resume_ , resume, NULL, "Resume a paused application", AFB_SESSION_CHECK_V2 }, {_runners_ , runners, NULL, "Get the list of running applications", AFB_SESSION_CHECK_V2 }, {_state_ , state, NULL, "Get the state of a running application", AFB_SESSION_CHECK_V2 }, {_install_ , install, NULL, "Install an application using a widget file", AFB_SESSION_CHECK_V2 }, {_uninstall_, uninstall, NULL, "Uninstall an application", AFB_SESSION_CHECK_V2 }, { NULL, NULL, NULL, NULL, 0 } }; const struct afb_binding_v2 afbBindingV2 = { .api = "afm-main", .specification = NULL, .info = "Application Framework Master Service", .verbs = verbs, .preinit = NULL, .init = init, .onevent = NULL, .noconcurrency = 1 /* relies on binder for serialisation of requests */ };