18 explicit Client(std::string serverAddr);
61 auto
stop() noexcept ->
bool;
76 const std::
string& password) noexcept ->
bool;
83 auto
removeUser(const std::
string& username) noexcept ->
bool;
90 auto
isExistUser(const std::
string& username) noexcept ->
bool;
105 const std::
string& password) noexcept ->
bool;
113 auto
addUserTag(const std::
string& username, const std::
string& tag) noexcept
123 const std::
string& tag) noexcept ->
bool;
131 -> std::vector<std::
string>;
141 const std::
string& message) noexcept ->
bool;
149 -> std::vector<std::
string>;
157 -> std::vector<std::
string>;
164 [[nodiscard]] auto
getPair(const std::
string& username)
165 -> std::vector<std::
string>;
168 std::
string serverAddr_;
169 zmq::context_t context_;
170 zmq::socket_t socket_;
179 auto sendRequestAndReceiveReply_(zmq::message_t& request,
180 zmq::message_t& reply) noexcept ->
bool;
A class to manage the API gateway operations.
Definition client.hpp:12
auto authenticateUser(const std::string &username, const std::string &password) noexcept -> bool
Authenticates a user.
auto start() noexcept -> bool
Starts the client.
auto getUserTags(const std::string &username) -> std::vector< std::string >
Gets the tags of a user.
Client(const Client &other)
Copy constructor for the Client class.
auto stop() noexcept -> bool
Stops the client.
auto removeUserTag(const std::string &username, const std::string &tag) noexcept -> bool
Removes a tag from a user.
auto operator=(const Client &other) -> Client &
Copy assignment operator for the Client class.
Client(std::string serverAddr)
Constructor for the Client class.
auto addUserTag(const std::string &username, const std::string &tag) noexcept -> bool
Adds a tag to a user.
~Client()
Destructor for the Client class.
auto sendMessage(const std::string &from, const std::string &to, const std::string &message) noexcept -> bool
Sends a message from one user to another.
Client(Client &&other) noexcept
Move constructor for the Client class.
auto operator=(Client &&other) noexcept -> Client &
Move assignment operator for the Client class.
auto listAllUsers() -> std::vector< std::string >
Gets a list of all users.
auto isExistUser(const std::string &username) noexcept -> bool
Checks if a user exists in the system.
auto getReceivedMessages(const std::string &username) -> std::vector< std::string >
Gets the messages received by a user.
auto getSentMessages(const std::string &username) -> std::vector< std::string >
Gets the messages sent by a user.
auto addUser(const std::string &username, const std::string &password) noexcept -> bool
Adds a user to the system.
auto getPair(const std::string &username) -> std::vector< std::string >
Gets the pair of a user.
auto restart() noexcept -> bool
Restarts the client.
auto removeUser(const std::string &username) noexcept -> bool
Removes a user from the system.