X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafm-main-binding.c;h=6c4f30281613c90a4fec522e624bc3065669c425;hb=ec742c3191df4aeda4cedd4761fd0b144d66ecd9;hp=51418887085634fd645334e04430297773aeb140;hpb=6b82274f126f62148c089f7d0ce810f08e45d79c;p=src%2Fapp-framework-main.git diff --git a/src/afm-main-binding.c b/src/afm-main-binding.c index 5141888..6c4f302 100644 --- a/src/afm-main-binding.c +++ b/src/afm-main-binding.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015, 2016 IoT.bzh + * Copyright (C) 2015, 2016, 2017 IoT.bzh * Author "Fulup Ar Foll" * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +21,7 @@ #include #include +#define AFB_BINDING_VERSION 1 #include #include "utils-jbus.h" @@ -34,6 +35,7 @@ static const char _id_[] = "id"; static const char _install_[] = "install"; static const char _local_[] = "local"; static const char _mode_[] = "mode"; +static const char _once_[] = "once"; static const char _pause_[] = "pause"; static const char _remote_[] = "remote"; static const char _resume_[] = "resume"; @@ -294,6 +296,11 @@ static void start(struct afb_req request) free(query); } +static void once(struct afb_req request) +{ + call_appid(request, _once_); +} + static void terminate(struct afb_req request) { call_runid(request, _terminate_); @@ -375,6 +382,7 @@ static const struct afb_verb_desc_v1 verbs[] = {_runnables_, AFB_SESSION_CHECK, runnables, "Get list of runnable applications"}, {_detail_ , AFB_SESSION_CHECK, detail, "Get the details for one application"}, {_start_ , AFB_SESSION_CHECK, start, "Start an application"}, + {_once_ , AFB_SESSION_CHECK, once, "Start once an application"}, {_terminate_, AFB_SESSION_CHECK, terminate, "Terminate a running application"}, {_pause_ , AFB_SESSION_CHECK, pause, "Pause a running application"}, {_resume_ , AFB_SESSION_CHECK, resume, "Resume a paused application"},