2 * Samsung Ukraine R&D Center (SRK under a contract between)
3 * LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
4 * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License
19 * @file application_service.h
20 * @brief Class for software installation and maintenance
21 * @date Created Jul 28, 2017
22 * @author Mail to: <A HREF="mailto:i.metelytsia@samsung.com">Iurii Metelytsia, i.metelytsia@samsung.com</A>
25 #ifndef __APPLICATION_SERVICE_H__
26 #define __APPLICATION_SERVICE_H__
34 * @brief The ApplicationService class is designed to install and maintain software
36 class ApplicationService
41 * @brief Install package
42 * @details This API can be used to install RPM package
43 * @param package_path_name [in] RPM package full pathname
44 * @return 0 if success
46 static int install(const std::string& package_path_name);
49 * @brief Uninstall package
50 * @details This API can be used to uninstall RPM package
51 * @param package_name [in] RPM package name
52 * @return 0 if success
54 static int uninstall(const std::string& package_name);
57 * @brief Find process id by application name
58 * @details This API can be used to find out process id
59 * @param name [in] application name
60 * @return process id or -1
62 static int get_process_id_by_name(const std::string& name);
65 * @brief Power off the device
66 * @details This API can be used to power off the device
67 * @return 0 if success
69 static int device_power_off();
74 #endif /* __APPLICATION_SERVICE_H__ */