The on-demand start of sam-agent by vconf flag was added.
[platform/core/security/suspicious-activity-monitor.git] / daemon / audit / audit_utils.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  * 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
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
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
17  */
18 /**
19  * @file   audit_utils.h
20  * @brief  Audit helper
21  * @date   Created Apr 03, 2018
22  * @author Mail to: <A HREF="mailto:i.metelytsia@samsung.com">Iurii Metelytsia, i.metelytsia@samsung.com</A>
23  */
24
25 #ifndef AUDIT_UTILS_H
26 #define AUDIT_UTILS_H
27
28 #include <string>
29 #include <vector>
30 #include <utility>
31
32 namespace audit
33 {
34 /**
35  * @brief Audit helper class
36  */
37 class AuditUtils
38 {
39 public:
40     /**
41      * @typedef SyscallList
42      * @brief System call list
43      */
44     using SyscallList = std::vector<std::pair<int, std::string>>;
45
46     /**
47      * @brief Get supported system calls
48      * @return system call list
49      */
50     static SyscallList syscallTable();
51
52     /**
53      * @brief Get the platform type
54      * @return platform string or nullptr
55      */
56     static const char* platformType();
57
58 private:
59     /**
60      * @brief Get the platform type
61      * @return platform type or -1 in case of error
62      */
63     static int platform();
64 };
65
66 } // namespace audit
67
68 #endif // AUDIT_UTILS_H