mirror of
https://gitlab.com/comunic/comunicterm
synced 2025-06-19 16:45:17 +00:00
Get the list of conversations
This commit is contained in:
76
entities/conversation.cpp
Normal file
76
entities/conversation.cpp
Normal file
@ -0,0 +1,76 @@
|
||||
#include "conversation.h"
|
||||
|
||||
Conversation::Conversation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int Conversation::iD() const
|
||||
{
|
||||
return mID;
|
||||
}
|
||||
|
||||
void Conversation::setID(int iD)
|
||||
{
|
||||
mID = iD;
|
||||
}
|
||||
|
||||
int Conversation::iD_Owner() const
|
||||
{
|
||||
return mID_Owner;
|
||||
}
|
||||
|
||||
void Conversation::setID_Owner(int iD_Owner)
|
||||
{
|
||||
mID_Owner = iD_Owner;
|
||||
}
|
||||
|
||||
int Conversation::lastActive() const
|
||||
{
|
||||
return mLastActive;
|
||||
}
|
||||
|
||||
void Conversation::setLastActive(int lastActive)
|
||||
{
|
||||
mLastActive = lastActive;
|
||||
}
|
||||
|
||||
std::string Conversation::name() const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
void Conversation::setName(const std::string &name)
|
||||
{
|
||||
mName = name;
|
||||
}
|
||||
|
||||
bool Conversation::following() const
|
||||
{
|
||||
return mFollowing;
|
||||
}
|
||||
|
||||
void Conversation::setFollowing(bool following)
|
||||
{
|
||||
mFollowing = following;
|
||||
}
|
||||
|
||||
bool Conversation::sawLastMessage() const
|
||||
{
|
||||
return mSawLastMessage;
|
||||
}
|
||||
|
||||
void Conversation::setSawLastMessage(bool sawLastMessage)
|
||||
{
|
||||
mSawLastMessage = sawLastMessage;
|
||||
}
|
||||
|
||||
std::vector<int> Conversation::members() const
|
||||
{
|
||||
return mMembers;
|
||||
}
|
||||
|
||||
void Conversation::setMembers(const std::vector<int> &members)
|
||||
{
|
||||
mMembers = members;
|
||||
}
|
47
entities/conversation.h
Normal file
47
entities/conversation.h
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Information about a conversation
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
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);
|
||||
|
||||
std::string name() const;
|
||||
void setName(const std::string &name);
|
||||
|
||||
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;
|
||||
bool mFollowing;
|
||||
bool mSawLastMessage;
|
||||
std::vector<int> mMembers;
|
||||
};
|
Reference in New Issue
Block a user