50 findusername(std::string &username);
54 findusername(std::string &username)
61 const char *user = Process::getEnv(
"LOGNAME");
62 if ( !user || !strcmp(user,
"") )
63 user = Process::getEnv(
"USER");
64 if ( !user || !strcmp(user,
"") )
65 username = Process::getUser();
76 findusername(std::string &username)
78 unsigned long len = 0;
79 if ( GetUserName(NULL,&len) && (len > 0) ) {
80 char *n =
new char[len];
88 #endif // #ifndef WIN32
108 state(stateUnknown), SSRC(ssrc), participant(NULL),
109 networkAddress(
"0"), dataTransportPort(0), controlTransportPort(0)
138 firstPart(NULL), lastPart(NULL)
141 if ( cname.length() > 0 )
153 #ifdef CCXX_EXCEPTIONS
157 #ifdef CCXX_EXCEPTIONS
162 #ifdef CCXX_EXCEPTIONS
166 #ifdef CCXX_EXCEPTIONS
176 while ( (NULL != pl) &&
215 std::string username;
216 findusername(username);
221 const char *p = iha.getHostname();
227 username +
"@" + hname);
void setPrev(ParticipantLink *l)
ParticipantLink * lastPart
const std::string & getItem(SDESItemType type) const
An RTP application, holding identifying RTCP SDES item values.
ParticipantLink * firstPart
List of participants, ordered from older to newer.
ParticipantLink * getNext()
Canonical end-point identifier.
ParticipantLink * getPrev()
Sources of synchronization and participants related clases.
Participant * getParticipant()
Declaration of ccRTP internal stuff.
std::string sdesItems[SDESItemTypeLast+1]
A class of objects representing remote participants (RTP applications) in a multimedia session...
void setItem(SDESItemType item, const std::string &val)
Participant(const std::string &cname)
Construct a new participant.
void findCNAME()
Find out the local CNAME as user@host and store it as part of the internal state of this class...
void setSDESItem(SDESItemType item, const std::string &val)
void addParticipant(Participant &part)
void removeParticipant(ParticipantLink *part)
RTPApplication(const std::string &cname)
Create a new RTP application.
Holds the SDES items and related information from a participant in an RTP application.
static const size_t defaultParticipantsNum
Hash table with sources of RTP and RTCP packets.
Participant ** participants
const Participant * getParticipant(const std::string &cname) const
RTPApplication & defaultApplication()
Get the RTPApplication object for the "default" application (the only one used by common applications...
void setNext(ParticipantLink *l)
SDESItemType
SDES items that may be carried in a Source DEScription RTCP packet.
const std::string & getSDESItem(SDESItemType type) const
Get the value of an SDES item.