mirror of
https://gitlab.com/comunic/comunicmessages
synced 2025-09-19 13:58:49 +00:00
Can get the list of conversations
This commit is contained in:
@@ -77,6 +77,15 @@ signals:
|
||||
*/
|
||||
void success(const QJsonDocument &document);
|
||||
|
||||
/**
|
||||
* Signal emitted once we consider the request as finished
|
||||
* It is emitted both in case of error and in case of success
|
||||
*
|
||||
* @param code The code of the error
|
||||
* @param document Data received in case of success
|
||||
*/
|
||||
void finished(int code, const QJsonDocument &document);
|
||||
|
||||
public slots:
|
||||
|
||||
private:
|
||||
|
76
data/conversation.cpp
Normal file
76
data/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::iDowner() const
|
||||
{
|
||||
return mIDowner;
|
||||
}
|
||||
|
||||
void Conversation::setIDowner(int iDowner)
|
||||
{
|
||||
mIDowner = iDowner;
|
||||
}
|
||||
|
||||
int Conversation::lastActive() const
|
||||
{
|
||||
return mLastActive;
|
||||
}
|
||||
|
||||
void Conversation::setLastActive(int lastActive)
|
||||
{
|
||||
mLastActive = lastActive;
|
||||
}
|
||||
|
||||
QString Conversation::name() const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
void Conversation::setName(const QString &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;
|
||||
}
|
||||
|
||||
QList<int> Conversation::members() const
|
||||
{
|
||||
return mMembers;
|
||||
}
|
||||
|
||||
void Conversation::setMembers(const QList<int> &members)
|
||||
{
|
||||
mMembers = members;
|
||||
}
|
50
data/conversation.h
Normal file
50
data/conversation.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* This widget contains information about
|
||||
* a single conversation
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
#ifndef CONVERSATION_H
|
||||
#define CONVERSATION_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
class Conversation
|
||||
{
|
||||
public:
|
||||
Conversation();
|
||||
|
||||
int iD() const;
|
||||
void setID(int iD);
|
||||
|
||||
int iDowner() const;
|
||||
void setIDowner(int iDowner);
|
||||
|
||||
int lastActive() const;
|
||||
void setLastActive(int lastActive);
|
||||
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
|
||||
bool following() const;
|
||||
void setFollowing(bool following);
|
||||
|
||||
bool sawLastMessage() const;
|
||||
void setSawLastMessage(bool sawLastMessage);
|
||||
|
||||
QList<int> members() const;
|
||||
void setMembers(const QList<int> &members);
|
||||
|
||||
private:
|
||||
int mID;
|
||||
int mIDowner;
|
||||
int mLastActive;
|
||||
QString mName;
|
||||
bool mFollowing;
|
||||
bool mSawLastMessage;
|
||||
QList<int> mMembers;
|
||||
};
|
||||
|
||||
#endif // CONVERSATION_H
|
Reference in New Issue
Block a user