2020-01-12 19:24:35 +00:00
|
|
|
/**
|
|
|
|
* Information about a conversation
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-01-12 20:15:51 +00:00
|
|
|
#include "user.h"
|
|
|
|
|
2020-01-12 19:24:35 +00:00
|
|
|
class Conversation
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Conversation();
|
|
|
|
|
|
|
|
int iD() const;
|
|
|
|
void setID(int iD);
|
|
|
|
|
|
|
|
int iD_Owner() const;
|
|
|
|
void setID_Owner(int iD_Owner);
|
|
|
|
|
|
|
|
int lastActive() const;
|
|
|
|
void setLastActive(int lastActive);
|
|
|
|
|
2020-01-12 20:15:51 +00:00
|
|
|
std::string name(UsersList users);
|
2020-01-12 19:24:35 +00:00
|
|
|
std::string name() const;
|
|
|
|
void setName(const std::string &name);
|
2020-01-12 20:15:51 +00:00
|
|
|
bool hasName() const;
|
2020-01-12 19:24:35 +00:00
|
|
|
|
|
|
|
bool following() const;
|
|
|
|
void setFollowing(bool following);
|
|
|
|
|
|
|
|
bool sawLastMessage() const;
|
|
|
|
void setSawLastMessage(bool sawLastMessage);
|
|
|
|
|
|
|
|
std::vector<int> members() const;
|
|
|
|
void setMembers(const std::vector<int> &members);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int mID;
|
|
|
|
int mID_Owner;
|
|
|
|
int mLastActive;
|
|
|
|
std::string mName;
|
2020-01-12 20:15:51 +00:00
|
|
|
std::string mComputedName = "";
|
2020-01-12 19:24:35 +00:00
|
|
|
bool mFollowing;
|
|
|
|
bool mSawLastMessage;
|
|
|
|
std::vector<int> mMembers;
|
|
|
|
};
|