2 * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef ALLOCATE_LIST_HPP
18 #define ALLOCATE_LIST_HPP
20 #include "windowmanager-client.hpp"
24 class AllocateRequestList {
26 AllocateRequestList();
27 ~AllocateRequestList();
28 AllocateRequestList(const AllocateRequestList &obj) = delete;
30 typedef std::function<void(const WMClient *)> onEndDraw;
31 typedef std::function<void(const WMClient *)> onReverted;
33 // Client Database Interface
34 void addClient(WMClient* client);
35 WMClient* loopUpClient(const char* appid);
38 bool hasRequestingApp(const char *appid);
39 void revertRequestingState();
40 void removeAllRequesting();
41 bool addRequest(WMClient *, onEndDraw, onReverted);
43 //void revertRequestingState();//???
45 /* bool queue(int request_num);
46 bool pushTop(int request_num);
48 void deleteAllElement();
49 void removeElement(int request_num);
50 bool hasElement(int request_num); */
53 std::vector<WMClient *> requestQueue;
58 #endif // ALLOCATE_LIST_HPP