aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Channel.hpp9
-rw-r--r--include/MessageBoard.hpp1
2 files changed, 9 insertions, 1 deletions
diff --git a/include/Channel.hpp b/include/Channel.hpp
index 5650eb1..be6e7c7 100644
--- a/include/Channel.hpp
+++ b/include/Channel.hpp
@@ -7,6 +7,7 @@
#include <vector>
#include <odhtdb/DatabaseNode.hpp>
#include <odhtdb/Signature.hpp>
+#include <odhtdb/Group.hpp>
namespace odhtdb
{
@@ -20,18 +21,24 @@ namespace dchat
public:
Channel(const std::string &name, const odhtdb::DatabaseNode &databaseNodeInfo = odhtdb::DatabaseNode(), User *localUser = nullptr, odhtdb::Database *database = nullptr);
virtual ~Channel();
+ Channel(const Channel& other) = delete;
+ Channel& operator = (const Channel &other) = delete;
User* getLocalUser();
+ SystemUser* getSystemUser();
MessageBoard& getMessageBoard();
const std::string& getName() const;
const std::vector<User*> getUsers() const;
User* getUserByPublicKey(const odhtdb::Signature::PublicKey &publicKey);
+ std::shared_ptr<odhtdb::Hash> getId();
// If timestamp is 0, then timestamp is not used
void addLocalMessage(const std::string &msg, User *owner, u64 timestampSeconds = 0);
void addMessage(const std::string &msg);
- void addUser(User *user);
+ void addUserLocally(User *user);
+ bool addUser(const odhtdb::Signature::PublicKey &userId, const std::string &groupId);
+ void replaceLocalUser(User *newLocalUser);
void processEvent(const sf::Event &event);
void draw(sf::RenderWindow &window, Cache &cache);
diff --git a/include/MessageBoard.hpp b/include/MessageBoard.hpp
index 739f161..e84396d 100644
--- a/include/MessageBoard.hpp
+++ b/include/MessageBoard.hpp
@@ -36,5 +36,6 @@ namespace dchat
double scrollSpeed;
sf::Clock frameTimer;
double totalHeight;
+ bool scrollToBottom;
};
}