Babel
Epitech's C++ VoIP project
|
Go to the documentation of this file.
68 void doJoinCall(
int callId, std::string &address, uint16_t port);
QtTCPConnection _connection
tcp connection handler
Definition: HomePage.hpp:40
void doDenyCall(int callId)
deny a callId
Definition: HomePage.cpp:345
void doLogin()
send a login request, look into field inputs for username
Definition: HomePage.cpp:106
void onCallUserResponse(const Message< RFCCodes > &m)
handler for any responses of the callUser request
Definition: HomePage.cpp:237
void changeCurrentUITab(QWidget *tab)
Change the currently selected tab.
Definition: HomePage.hpp:104
const uint16_t startUdpPort
The port to receive udp audio packets.
Definition: HomePage.hpp:30
void doCallUser()
Call a specific user look in the list for the selected username.
Definition: HomePage.cpp:215
Main client Class.
Definition: HomePage.hpp:18
Definition: QtTCPConnection.hpp:17
std::map< std::string, UserInfo > _usersInfos
Userinfo holder the username is the key.
Definition: HomePage.hpp:139
void doHangUp()
quit a call
Definition: HomePage.cpp:306
All the necessary information to handle a response.
Definition: HomePage.hpp:110
bool canBeCalled
Tell the client if he can call this user.
Definition: HomePage.hpp:129
void sendHandler(const Message< RFCCodes > &m)
send the message to the server and add it to the message send queue to handle responses type
Definition: HomePage.cpp:162
TSQueue< RFCCodes > _requestsMade
all the request made by the client (expecting a response)
Definition: HomePage.hpp:43
void onMessage(Message< RFCCodes > m)
is used to redirect responses from request to the correct handling functions
Definition: HomePage.cpp:117
void handleUserLeft(const Message< RFCCodes > &m)
handle user left request
Definition: HomePage.cpp:415
void updateDisplaySelectedUser()
Update qt interface to display the correct username and infos.
Definition: HomePage.cpp:205
std::string address
The udp address to send our voice to this user.
Definition: HomePage.hpp:125
All the necessary information for a user in call or in the display list.
Definition: HomePage.hpp:122
void onJoinCall(const Message< RFCCodes > &m)
handler for any responses of the joinCall request
Definition: HomePage.cpp:265
HomePage()
ctor
Definition: HomePage.cpp:17
void handleIncomingCall(const Message< RFCCodes > &m)
handle incoming call request
Definition: HomePage.cpp:363
std::list< std::string > _usersInCurrentCall
a list containing all users in the currentCall
Definition: HomePage.hpp:142
Definition: IAudioManager.hpp:13
std::map< RFCCodes, MessageHandler > _messageHandlers
Used to call the correct handling function.
Definition: HomePage.hpp:118
Ui::babelHome _ui
The UI Class.
Definition: HomePage.hpp:37
~HomePage() override=default
dtor
QTabWidget * tab_handler
Definition: UIHomePage.hpp:39
void handleUserJoined(const Message< RFCCodes > &m)
handle user joined request
Definition: HomePage.cpp:391
void doJoinCall(int callId, std::string &address, uint16_t port)
join the callId given
Definition: HomePage.cpp:353
SoundHandler _audio
Audio call manager.
Definition: HomePage.hpp:46
static constexpr int CurrentlyNotInCall
Used to set and verify the _currentCallId if a call is ongoing.
Definition: HomePage.hpp:145
std::function< void(const Message< RFCCodes > &m)> method
the function to handle the request response type
Definition: HomePage.hpp:113
void onLoginResponse(const Message< RFCCodes > &m)
handler for any responses of the login request
Definition: HomePage.cpp:138
uint16_t port
The udp port to send our voice to this user.
Definition: HomePage.hpp:127
std::string _address
The local ip.
Definition: HomePage.hpp:153
Definition: SoundHandler.hpp:23
UserInfo()
needed ctor without args
Definition: HomePage.cpp:445
Definition: UIHomePage.hpp:267
void doListUsers()
send a listUsers request
Definition: HomePage.cpp:199
static void onBasicResponse(const Message< RFCCodes > &m)
handler for any simple responses (opens a dialog if error) otherwise do nothing
Definition: HomePage.cpp:332
std::string _username
The username of the connected user.
Definition: HomePage.hpp:157
QMainWindow * _window
The display window.
Definition: HomePage.hpp:34
int _currentCallId
handling the callId of the current call (to be able to hang up, ...)
Definition: HomePage.hpp:149
void onListUsersResponse(const Message< RFCCodes > &m)
handler for any responses of the listuser request
Definition: HomePage.cpp:167
void doConnect()
Connects to the server with tcp.
Definition: HomePage.cpp:102