58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* Client.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/04/13 22:31:44 by aortigos #+# #+# */
|
|
/* Updated: 2026/04/13 22:31:44 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef CLIENT_HPP
|
|
# define CLIENT_HPP
|
|
|
|
# include <iostream>
|
|
# include <string>
|
|
|
|
class Client
|
|
{
|
|
private:
|
|
int fd;
|
|
std::string nick;
|
|
std::string username;
|
|
std::string realname;
|
|
std::string buffer;
|
|
bool registered;
|
|
bool authenticated;
|
|
|
|
public:
|
|
Client();
|
|
Client(int fd);
|
|
~Client();
|
|
|
|
|
|
|
|
// Getters
|
|
int getFd() const;
|
|
std::string getNick() const;
|
|
std::string getUsername() const;
|
|
std::string getRealname() const;
|
|
std::string getBuffer() const;
|
|
bool isAuthenticated() const;
|
|
bool isRegistered() const;
|
|
|
|
// Seters
|
|
void setNick(std::string nick);
|
|
void setUsername(std::string username);
|
|
void setRealname(std::string realname);
|
|
void setAuthenticated(bool value);
|
|
void setRegistered(bool value);
|
|
void appendBuffer(std::string data);
|
|
void clearBuffer();
|
|
|
|
};
|
|
|
|
#endif
|