Use feature 'required-binding'
[apps/agl-service-windowmanager-2017.git] / src / request.hpp
1 /*
2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef WMREQUEST_HPP
18 #define WMREQUEST_HPP
19
20 #include <string>
21 #include <vector>
22
23 namespace wm
24 {
25
26 enum Task
27 {
28     TASK_ALLOCATE,
29     TASK_RELEASE,
30     TASK_INVALID
31 };
32
33 enum TaskVisible
34 {
35     VISIBLE,
36     INVISIBLE,
37     NO_CHANGE
38 };
39
40 struct WMTrigger
41 {
42     std::string appid;
43     std::string role;
44     std::string area;
45     Task task;
46 };
47
48 struct WMAction
49 {
50     std::string appid;
51     std::string role;
52     std::string area;
53     TaskVisible visible;
54     bool end_draw_finished;
55 };
56
57 struct WMRequest
58 {
59     WMRequest();
60     explicit WMRequest(std::string appid, std::string role,
61                        std::string area, Task task);
62     virtual ~WMRequest();
63     WMRequest(const WMRequest &obj);
64
65     unsigned req_num;
66     struct WMTrigger trigger;
67     std::vector<struct WMAction> sync_draw_req;
68 };
69
70 } // namespace wm
71
72 #endif //WMREQUEST_HPP