Add gitlab issue/merge request templates
[apps/agl-service-windowmanager.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 #include <memory>
23
24 namespace wm
25 {
26
27 class WMClient;
28
29 enum Task
30 {
31     TASK_ALLOCATE,
32     TASK_RELEASE,
33     TASK_CHANGE_AREA,
34     TASK_INVALID
35 };
36
37 enum TaskVisible
38 {
39     VISIBLE,
40     INVISIBLE,
41     NO_CHANGE
42 };
43
44 struct WMTrigger
45 {
46     std::string appid;
47     std::string role;
48     std::string area;
49     Task task;
50 };
51
52 struct WMAction
53 {
54     unsigned req_num;
55     std::shared_ptr<WMClient> client;
56     std::string role;
57     std::string area;
58     TaskVisible visible;
59     bool end_draw_finished;
60 };
61
62 struct WMRequest
63 {
64     WMRequest();
65     explicit WMRequest(std::string appid, std::string role,
66                        std::string area, Task task);
67     virtual ~WMRequest();
68     WMRequest(const WMRequest &obj);
69
70     unsigned req_num;
71     struct WMTrigger trigger;
72     std::vector<struct WMAction> sync_draw_req;
73 };
74
75 } // namespace wm
76
77 #endif //WMREQUEST_HPP