aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocate_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/allocate_queue.cpp')
-rw-r--r--src/allocate_queue.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/allocate_queue.cpp b/src/allocate_queue.cpp
index 0d7a646..14bf6f5 100644
--- a/src/allocate_queue.cpp
+++ b/src/allocate_queue.cpp
@@ -17,8 +17,11 @@
#include "allocate_queue.hpp"
#include <algorithm>
+using std::string;
+
namespace wm {
+
AllocateRequestList::AllocateRequestList(){}
AllocateRequestList::~AllocateRequestList(){}
@@ -26,22 +29,19 @@ bool AllocateRequestList::addClient(WMClient* client){
return true;
}
-void AllocateRequestList::removeClient(const char* appid){
- return true;
+void AllocateRequestList::removeClient(const string &appid){
}
-const WMClient* AllocateRequestList::lookUpClient(const char appid){
- std::string key = std::string(appid);
- auto itr = client_list.find(appid);
- return (itr != client_list.end()) ? itr.second() : nullptr;
+WMClient* AllocateRequestList::lookUpClient(const string &appid){
+ return nullptr;
}
-unsigned AllocateRequestList::getSequenceNumber(appid, role, area){
+unsigned AllocateRequestList::getSequenceNumber(const string &appid, const string &role, const string &area){
return 0;
}
-bool AllocateRequestList::addAllocateRequest(WMClient &client, unsigned seq_num, std::string &task){
- return true;
+unsigned AllocateRequestList::addAllocateRequest(WMRequest req){
+ return 1;
}
bool AllocateRequestList::requestFinished(){
@@ -52,8 +52,12 @@ unsigned AllocateRequestList::lookUpAllocatingApp(const char *appid){
return 1;
}
-unsigned AllocateRequestList::currentSequnce(const char *appid){
- return 1;
+void AllocateRequestList::setEndDrawFinished(unsigned request_seq, const string &role){
+
+}
+
+bool AllocateRequestList::endDrawFullfilled(unsigned request_seq){
+ return false;
}
void AllocateRequestList::removeRequest(unsigned req_seq){
@@ -61,7 +65,10 @@ void AllocateRequestList::removeRequest(unsigned req_seq){
}
void AllocateRequestList::setCurrentSequence(unsigned req_seq){
-
+ this->seq_num = req_seq;
+ if(0 == this->seq_num){
+ this->seq_num = 1;
+ }
}
bool AllocateRequestList::haveRequest(){