[SECARSP-143] Notifications component was implemented and integrated into Dashboard
[platform/core/security/suspicious-activity-monitor.git] / device-agent / samonitor / application_service.h
1 /**
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.
5  */
6 /**
7  * @file   application_service.h
8  * @brief  Class for software installation and maintenance
9  * @date   Created Jul 28, 2017
10  * @author Mail to: <A HREF="mailto:i.metelytsia@samsung.com">Iurii Metelytsia, i.metelytsia@samsung.com</A>
11  */
12
13 #ifndef __APPLICATION_SERVICE_H__
14 #define __APPLICATION_SERVICE_H__
15
16 #include <string>
17
18 namespace NMD
19 {
20
21 /**
22  * @brief The ApplicationService class is designed to install and maintain software
23  */
24 class ApplicationService
25 {
26 public:
27
28     /**
29      * @brief Install package
30      * @details This API can be used to install RPM package
31      * @param package_path_name [in] RPM package full pathname
32      * @return 0 if success
33      */
34     static int install(const std::string& package_path_name);
35
36     /**
37      * @brief Uninstall package
38      * @details This API can be used to uninstall RPM package
39      * @param package_name [in] RPM package name
40      * @return 0 if success
41      */
42     static int uninstall(const std::string& package_name);
43
44     /**
45      * @brief Find process id by application name
46      * @details This API can be used to find out process id
47      * @param name [in] application name
48      * @return process id or -1
49      */
50     static int get_process_id_by_name(const std::string& name);
51
52     /**
53      * @brief Power off the device
54      * @details This API can be used to power off the device
55      * @return 0 if success
56      */
57     static int device_power_off();
58
59 };
60
61 } // namespace NMD
62
63 #endif /* __APPLICATION_SERVICE_H__ */