Babel
Epitech's C++ VoIP project
Call.hpp
Go to the documentation of this file.
1 //
2 // Created by cbihan on 11/10/2021.
3 //
4 
5 #pragma once
6 
7 #include <vector>
8 #include <string>
9 #include "Network/Message.hpp"
10 #include "Network/RFCCodes.hpp"
12 
13 namespace Babel
14 {
16  struct Call
17  {
19  struct Participant
20  {
21  uint64_t connectionId;
22  std::string address;
23  uint16_t port;
24  std::string username;
25 
26  bool operator==(const Participant &p) const;
27 
29  };
30 
31  std::vector<Participant> participants;
32 
33  explicit Call();
34 
35  void addParticipant(ITCPConnection<RFCCodes> &p, std::string udpAddress, uint16_t udpPort, std::string username);
36  bool isParticipant(const ITCPConnection<RFCCodes> &p) const;
38 
40  };
41 
42 }
43 
Babel::Call::Participant::username
std::string username
Definition: Call.hpp:24
Message.hpp
Babel::Call::Participant::operator==
bool operator==(const Participant &p) const
Definition: Call.cpp:48
Babel::Call
struct to handle all Call related data
Definition: Call.hpp:16
Babel::Call::Participant::address
std::string address
Definition: Call.hpp:22
Babel::Call::isParticipant
bool isParticipant(const ITCPConnection< RFCCodes > &p) const
Definition: Call.cpp:22
Babel::Call::appendAllIPs
Message< RFCCodes > & appendAllIPs(Message< RFCCodes > &m) const
Definition: Call.cpp:39
ITCPConnection.hpp
Babel::Message< RFCCodes >
RFCCodes.hpp
Babel::Call::participants
std::vector< Participant > participants
Definition: Call.hpp:31
Babel::Call::addParticipant
void addParticipant(ITCPConnection< RFCCodes > &p, std::string udpAddress, uint16_t udpPort, std::string username)
Definition: Call.cpp:17
Babel
Definition: IAudioManager.hpp:13
Babel::ITCPConnection< RFCCodes >
Babel::Call::removeParticipant
void removeParticipant(ITCPConnection< RFCCodes > &p)
Definition: Call.cpp:30
Babel::Call::Participant::port
uint16_t port
Definition: Call.hpp:23
Babel::Call::Participant
struct to handle all Call related data
Definition: Call.hpp:19
Babel::Call::Call
Call()
Definition: Call.cpp:12
Babel::Call::Participant::appendIP
Message< RFCCodes > & appendIP(Message< RFCCodes > &m) const
Definition: Call.cpp:53
Babel::Call::Participant::connectionId
uint64_t connectionId
Definition: Call.hpp:21