Babel
Epitech's C++ VoIP project
|
Go to the documentation of this file.
124 [
this](std::shared_ptr<ITCPConnection<RFCCodes>> c,
131 return this->
listUsers(std::move(c), std::move(m));
137 return this->
callUser(std::move(c), std::move(m));
144 return this->
joinCall(std::move(c), std::move(m));
151 return this->
denyCall(std::move(c), std::move(m));
158 return this->
hangUpCall(std::move(c), std::move(m));
Message< RFCCodes > & getCallAllIPs(Message< RFCCodes > &m, const Call &call)
Definition: BabelServer.cpp:196
FreeList< Call > ongoingCalls
The list of all ongoing calls.
Definition: BabelServer.hpp:109
struct to handle all Call related data
Definition: Call.hpp:16
Message< RFCCodes > denyCall(std::shared_ptr< ITCPConnection< RFCCodes >> connection, Message< RFCCodes > message)
The function to call to manage a denyCall request.
Definition: BabelServer.cpp:174
void onClientDisconnect(std::shared_ptr< ITCPConnection< RFCCodes >> client) override
Called when a client disconnect.
Definition: BabelServer.cpp:56
Message< RFCCodes > hangUpCall(std::shared_ptr< ITCPConnection< RFCCodes >> connection, Message< RFCCodes > message)
The function to call to manage a hangUp request.
Definition: BabelServer.cpp:181
std::map< uint64_t, User > _users
All the connected user.
Definition: BabelServer.hpp:106
void messageAllParticipants(Call &call, const Message< RFCCodes > &m)
Send a message to all current call participants.
Definition: BabelServer.cpp:214
bool isValidCallId(int callId) const
Tells if a given callId is currently pointing to an active call.
Definition: BabelServer.cpp:222
bool onClientConnect(std::shared_ptr< ITCPConnection< RFCCodes >> client) override
Called when a client connect.
Definition: BabelServer.cpp:50
Provides an indexed free list with constant-time removals from anywhere in the list without invalidat...
Definition: FreeList.hpp:16
Message< RFCCodes > callUser(std::shared_ptr< ITCPConnection< RFCCodes >> connection, Message< RFCCodes > message)
The function to call to manage a callUser request.
Definition: BabelServer.cpp:101
void onMessage(std::shared_ptr< ITCPConnection< RFCCodes >> client, Message< RFCCodes > &msg) override
Called when we received a message from a client.
Definition: BabelServer.cpp:33
Message< RFCCodes > joinCall(std::shared_ptr< ITCPConnection< RFCCodes >> connection, Message< RFCCodes > message)
The function to call to manage a joinCall request.
Definition: BabelServer.cpp:128
Message< RFCCodes > listUsers(std::shared_ptr< ITCPConnection< RFCCodes >> connection, Message< RFCCodes > message)
The function to call to manage a listUser request.
Definition: BabelServer.cpp:77
Definition: IAudioManager.hpp:13
@ DenyCall
Deny a receiving call from a user.
Main server class contains almost all the logic for the server.
Definition: BabelServer.hpp:27
@ ListUsers
Get the list of server currently active users.
Utils struct to store requests information.
Definition: BabelServer.hpp:112
void announceUserLeftCall(Call &call, const ITCPConnection< RFCCodes > &connectionLeaving)
Definition: BabelServer.cpp:239
@ Login
Login a user in the server.
std::function< Message< RFCCodes >std::shared_ptr< ITCPConnection< RFCCodes > >, Message< RFCCodes >)> method
the actual function to call to process the request
Definition: BabelServer.hpp:115
Implementation of ITCPServer using ASIO.
Definition: AsioTCPServer.hpp:22
bool getUserByUsername(const std::string &username, User &user)
Utility function to get the User from it's username.
Definition: BabelServer.cpp:163
std::shared_ptr< ITCPConnection< RFCCodes > > getConnectionById(uint64_t id) const
Get the connection from it's Id.
Definition: BabelServer.cpp:204
std::map< RFCCodes, RequestHandler > requestsHandlers
map that map a RFCCode to an requestHandler
Definition: BabelServer.hpp:121
Message< RFCCodes > login(std::shared_ptr< ITCPConnection< RFCCodes >> connection, Message< RFCCodes > message)
The function to call to manage a login request.
Definition: BabelServer.cpp:15
@ JoinCall
Accept a call from a user.
bool loginRequired
prerequisite of the request
Definition: BabelServer.hpp:117
@ CallUser
Call a user from it's username.