aboutsummaryrefslogtreecommitdiff
path: root/include/Channel.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Channel.hpp')
-rw-r--r--include/Channel.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/Channel.hpp b/include/Channel.hpp
index 535cce5..17128fd 100644
--- a/include/Channel.hpp
+++ b/include/Channel.hpp
@@ -4,6 +4,7 @@
#include "Chatbar.hpp"
#include "User.hpp"
#include "Channel.hpp"
+#include "types.hpp"
#include <vector>
#include <odhtdb/DatabaseNode.hpp>
#include <odhtdb/Signature.hpp>
@@ -16,6 +17,12 @@ namespace odhtdb
namespace dchat
{
+ enum class ChannelDataType : u8
+ {
+ MESSAGE,
+ NICKNAME_CHANGE
+ };
+
class Channel
{
public:
@@ -30,7 +37,7 @@ namespace dchat
const std::string& getName() const;
const std::vector<User*> getUsers() const;
- User* getUserByPublicKey(const odhtdb::Signature::PublicKey &publicKey);
+ OnlineUser* getUserByPublicKey(const odhtdb::Signature::PublicKey &publicKey);
const odhtdb::DatabaseNode& getNodeInfo() const;
// If timestamp is 0, then timestamp is not used
@@ -39,6 +46,7 @@ namespace dchat
void addUserLocally(User *user);
bool addUser(const odhtdb::Signature::PublicKey &userId, const std::string &groupId);
void replaceLocalUser(User *newLocalUser);
+ void changeNick(const std::string &newNick);
void processEvent(const sf::Event &event);
void draw(sf::RenderWindow &window, Cache &cache);