mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: more rigorous types for GroupInvite
This commit is contained in:
parent
ad3584c469
commit
fd1fbebae0
@ -25,8 +25,8 @@
|
|||||||
* @brief This class contains information needed to create a group invite
|
* @brief This class contains information needed to create a group invite
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GroupInvite::GroupInvite(int32_t friendID, uint8_t inviteType, const QByteArray& data)
|
GroupInvite::GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data)
|
||||||
: friendId{friendID}
|
: friendId{friendId}
|
||||||
, type{inviteType}
|
, type{inviteType}
|
||||||
, invite{data}
|
, invite{data}
|
||||||
, date{QDateTime::currentDateTime()}
|
, date{QDateTime::currentDateTime()}
|
||||||
@ -39,7 +39,7 @@ bool GroupInvite::operator==(const GroupInvite& other) const
|
|||||||
&& date == other.date;
|
&& date == other.date;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t GroupInvite::getFriendId() const
|
uint32_t GroupInvite::getFriendId() const
|
||||||
{
|
{
|
||||||
return friendId;
|
return friendId;
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,16 @@
|
|||||||
class GroupInvite
|
class GroupInvite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GroupInvite(int32_t friendID, uint8_t inviteType, const QByteArray& data);
|
GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data);
|
||||||
bool operator==(const GroupInvite& other) const;
|
bool operator==(const GroupInvite& other) const;
|
||||||
|
|
||||||
int32_t getFriendId() const;
|
uint32_t getFriendId() const;
|
||||||
uint8_t getType() const;
|
uint8_t getType() const;
|
||||||
QByteArray getInvite() const;
|
QByteArray getInvite() const;
|
||||||
QDateTime getInviteDate() const;
|
QDateTime getInviteDate() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t friendId;
|
uint32_t friendId;
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
QByteArray invite;
|
QByteArray invite;
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user