#include <ctime>
#include <string>
+#include <vector>
+#include <string>
+
#include "os_int.h"
#include "notifer.h"
#include "message.h"
const AUTH * auth) = 0;
virtual void Unauthorize(const AUTH * auth) = 0;*/
virtual bool IsAuthorizedBy(const AUTH * auth) const = 0;
+ virtual std::vector<std::string> GetAuthorizers() const = 0;
virtual int AddMessage(STG_MSG * msg) = 0;
#include <cassert>
#include <cstdlib>
#include <cmath>
+#include <algorithm>
+#include <functional>
#include "stg/users.h"
#include "stg/common.h"
return authorizedBy.find(auth) != authorizedBy.end();
}
//-----------------------------------------------------------------------------
+std::vector<std::string> USER_IMPL::GetAuthorizers() const
+{
+ std::vector<std::string> list;
+ std::transform(authorizedBy.begin(), authorizedBy.end(), std::back_inserter(list), std::mem_fun(&AUTH::GetVersion));
+ return list;
+}
+//-----------------------------------------------------------------------------
void USER_IMPL::Connect(bool fakeConnect)
{
/*
#include <ctime>
#include <list>
+#include <vector>
#include <string>
#include <set>
int Authorize(uint32_t ip, uint32_t enabledDirs, const AUTH * auth);
void Unauthorize(const AUTH * auth);
bool IsAuthorizedBy(const AUTH * auth) const;
+ std::vector<std::string> GetAuthorizers() const;
int AddMessage(STG_MSG * msg);