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