2021-11-27 00:53:57 +01:00
|
|
|
#pragma once
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-03-06 22:22:19 +01:00
|
|
|
#include <Common.h>
|
2017-08-27 02:04:04 +02:00
|
|
|
#include <set>
|
2019-11-23 09:22:42 +00:00
|
|
|
#include <string>
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-11-29 16:55:48 +01:00
|
|
|
namespace Sapphire
|
2017-08-27 02:04:04 +02:00
|
|
|
{
|
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
class Linkshell
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
/*! unique ID of the linkshell */
|
|
|
|
uint64_t m_linkshellId;
|
|
|
|
/*! ID of the master character */
|
|
|
|
uint64_t m_masterCharacterId;
|
|
|
|
/*! ID list of all linkshell members */
|
|
|
|
std::set< uint64_t > m_memberIds;
|
|
|
|
/*! Name of the linkshell */
|
|
|
|
std::string m_name;
|
|
|
|
/*! List of member IDs with leader rank */
|
|
|
|
std::set< uint64_t > m_leaderIds;
|
|
|
|
/*! list of IDs of pending character invites */
|
|
|
|
std::set< uint64_t > m_inviteIds;
|
2021-11-27 00:53:57 +01:00
|
|
|
/*! chat channel ID associated with linkshell */
|
|
|
|
uint64_t m_chatChannelId;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
public:
|
|
|
|
Linkshell( uint64_t id,
|
2021-11-27 00:53:57 +01:00
|
|
|
std::string name,
|
|
|
|
uint64_t chatChannelId,
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t masterId,
|
2021-11-27 00:53:57 +01:00
|
|
|
std::set< uint64_t > members,
|
|
|
|
std::set< uint64_t > leaders,
|
|
|
|
std::set< uint64_t > invites );
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t getId() const;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
const std::string& getName() const;
|
2021-12-12 23:26:12 +01:00
|
|
|
void setName( std::string name );
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t getMasterId() const;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2021-12-12 15:56:45 +01:00
|
|
|
void setMasterId( uint64_t masterId );
|
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
const std::set< uint64_t >& getMemberIdList() const;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
std::set< uint64_t >& getMemberIdList();
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
const std::set< uint64_t >& getLeaderIdList() const;
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
std::set< uint64_t >& getLeaderIdList();
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
const std::set< uint64_t >& getInviteIdList() const;
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
std::set< uint64_t >& getInviteIdList();
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2021-11-27 00:53:57 +01:00
|
|
|
uint64_t getChatChannel() const;
|
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void addMember( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void removeMember( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void addLeader( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void removeLeader( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void addInvite( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void removeInvite( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
};
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2021-11-27 00:53:57 +01:00
|
|
|
}
|