urbackup_backend/Interface/User.h
Martin Raiber d8814ca3d7 Fix session locking
(cherry picked from commit df52d79b7aae07a54fdfc7add6d9b56accf01cd8)
2018-10-12 14:12:51 +02:00

36 lines
594 B
C++

#ifndef IUSER_H
#define IUSER_H
#include <map>
#include <string>
#include "Object.h"
#include "Types.h"
struct SUser
{
std::string username;
std::string session;
std::string ident_data;
int id;
str_map mStr;
int_map mInt;
float_map mFloat;
std::map<std::string, IObject* > mCustom;
int64 lastused;
int waitlock;
int refcount;
IObject* getCustomPtr(std::string str)
{
std::map<std::string, IObject* >::iterator iter=mCustom.find(str);
if( iter!=mCustom.end() )
{
return iter->second;
}
else
return NULL;
}
};
#endif //IUSER_H