lxcpp: fix cgroup unit tests
[platform/core/security/vasum.git] / server / input-monitor-config.hpp
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Pawel Broda <p.broda@partner.samsung.com>
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 /**
20  * @file
21  * @author  Pawel Broda (p.broda@partner.samsung.com)
22  * @brief   Declaration of the struct for storing input monitor configuration
23  */
24
25
26 #ifndef SERVER_INPUT_MONITOR_CONFIG_HPP
27 #define SERVER_INPUT_MONITOR_CONFIG_HPP
28
29
30 #include "config/fields.hpp"
31
32 #include <string>
33
34
35 namespace vasum {
36
37 struct InputConfig {
38
39     /**
40      * Is monitoring input enabled?
41      */
42     bool enabled;
43
44     /**
45      * Device name or an absolute device file path
46      * (must be a string starting with '/' character)
47      */
48     std::string device;
49
50     /**
51      * Event code
52      */
53     int code;
54
55     /**
56      * Number of events that will trigger an action
57      */
58     int numberOfEvents;
59
60     /**
61      * Time window in which subsequent events will trigger an action
62      */
63     int timeWindowMs;
64
65     CONFIG_REGISTER
66     (
67         enabled,
68         device,
69         code,
70         numberOfEvents,
71         timeWindowMs
72     )
73
74 };
75
76 } // namespace vasum
77
78 #endif /* SERVER_INPUT_MONITOR_CONFIG_HPP */