2 * Copyright (c) 2017 - 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "include/aul_job_scheduler.h"
19 #include <bundle_cpp.h>
21 #include "app_request.h"
24 #include "include/aul.h"
25 #include "include/aul_sock.h"
27 extern "C" API int aul_job_scheduler_update_job_status(const char* job_id,
28 aul_job_status_e job_status) {
29 if (job_id == nullptr ||
30 job_status < JOB_STATUS_START ||
31 job_status > JOB_STATUS_FINISHED) {
32 _E("Invalid parameter");
36 tizen_base::Bundle b {
37 { AUL_K_JOB_ID, job_id },
38 { AUL_K_JOB_STATUS, std::to_string(job_status) }
41 return aul::internal::AppRequest(JOB_STATUS_UPDATE, getuid())
43 .SendSimply(AUL_SOCK_NOREPLY);