live
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
SIPClient Class Reference

#include <SIPClient.hh>

Inheritance diagram for SIPClient:
Inheritance graph
[legend]
Collaboration diagram for SIPClient:
Collaboration graph
[legend]

Public Member Functions

void setProxyServer (struct sockaddr_storage const &proxyServerAddress, portNumBits proxyServerPortNum)
 
void setClientStartPortNum (portNumBits clientStartPortNum)
 
char * invite (char const *url, Authenticator *authenticator=NULL)
 
char * inviteWithPassword (char const *url, char const *username, char const *password)
 
Boolean sendACK ()
 
Boolean sendBYE ()
 
char const * getInviteSdpReply () const
 
void setUserAgentString (char const *userAgentName)
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () const
 
virtual Boolean isSink () const
 
virtual Boolean isRTCPInstance () const
 
virtual Boolean isRTSPClient () const
 
virtual Boolean isRTSPServer () const
 
virtual Boolean isMediaSession () const
 
virtual Boolean isServerMediaSession () const
 

Static Public Member Functions

static SIPClientcreateNew (UsageEnvironment &env, unsigned char desiredAudioRTPPayloadFormat, char const *mimeSubtype=NULL, int verbosityLevel=0, char const *applicationName=NULL)
 
static Boolean parseSIPURL (UsageEnvironment &env, char const *url, NetAddress &address, portNumBits &portNum)
 
static Boolean parseSIPURLUsernamePassword (char const *url, char *&username, char *&password)
 
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
 
static void close (UsageEnvironment &env, char const *mediumName)
 
static void close (Medium *medium)
 

Protected Member Functions

virtual ~SIPClient ()
 
TaskTokennextTask ()
 

Private Member Functions

 SIPClient (UsageEnvironment &env, unsigned char desiredAudioRTPPayloadFormat, char const *mimeSubtype, int verbosityLevel, char const *applicationName)
 
void reset ()
 
char * invite1 (Authenticator *authenticator)
 
Boolean processURL (char const *url)
 
Boolean sendINVITE ()
 
void doInviteStateMachine (unsigned responseCode)
 
void doInviteStateTerminated (unsigned responseCode)
 
char * createAuthenticatorString (Authenticator const *authenticator, char const *cmd, char const *url)
 
Boolean sendRequest (char const *requestString, unsigned requestLength)
 
unsigned getResponseCode ()
 
unsigned getResponse (char *&responseBuffer, unsigned responseBufferSize)
 
Boolean parseResponseCode (char const *line, unsigned &responseCode)
 

Static Private Member Functions

static void inviteResponseHandler (void *clientData, int mask)
 
static void timerAHandler (void *clientData)
 
static void timerBHandler (void *clientData)
 
static void timerDHandler (void *clientData)
 

Private Attributes

TaskToken fTimerA
 
TaskToken fTimerB
 
TaskToken fTimerD
 
unsigned const fT1
 
unsigned fTimerALen
 
unsigned fTimerACount
 
unsigned char fDesiredAudioRTPPayloadFormat
 
char * fMIMESubtype
 
unsigned fMIMESubtypeSize
 
int fVerbosityLevel
 
unsigned fCSeq
 
char const * fApplicationName
 
unsigned fApplicationNameSize
 
char const * fOurAddressStr
 
unsigned fOurAddressStrSize
 
portNumBits fOurPortNum
 
GroupsockfOurSocket
 
char * fUserAgentHeaderStr
 
unsigned fUserAgentHeaderStrLen
 
char const * fURL
 
unsigned fURLSize
 
struct sockaddr_storage fServerAddress
 
Boolean fServerAddressIsSet
 
portNumBits fServerPortNum
 
portNumBits fClientStartPortNum
 
unsigned fCallId
 
unsigned fFromTag
 
char const * fToTagStr
 
unsigned fToTagStrSize
 
Authenticator fValidAuthenticator
 
char const * fUserName
 
unsigned fUserNameSize
 
char * fInviteSDPDescription
 
char * fInviteSDPDescriptionReturned
 
char * fInviteCmd
 
unsigned fInviteCmdSize
 
AuthenticatorfWorkingAuthenticator
 
inviteClientState fInviteClientState
 
char fEventLoopStopFlag
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Detailed Description

Definition at line 37 of file SIPClient.hh.

Constructor & Destructor Documentation

◆ ~SIPClient()

virtual SIPClient::~SIPClient ( )
protectedvirtual

◆ SIPClient()

SIPClient::SIPClient ( UsageEnvironment env,
unsigned char  desiredAudioRTPPayloadFormat,
char const *  mimeSubtype,
int  verbosityLevel,
char const *  applicationName 
)
private

Member Function Documentation

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited

◆ createAuthenticatorString()

char * SIPClient::createAuthenticatorString ( Authenticator const *  authenticator,
char const *  cmd,
char const *  url 
)
private

◆ createNew()

static SIPClient * SIPClient::createNew ( UsageEnvironment env,
unsigned char  desiredAudioRTPPayloadFormat,
char const *  mimeSubtype = NULL,
int  verbosityLevel = 0,
char const *  applicationName = NULL 
)
static

◆ doInviteStateMachine()

void SIPClient::doInviteStateMachine ( unsigned  responseCode)
private

◆ doInviteStateTerminated()

void SIPClient::doInviteStateTerminated ( unsigned  responseCode)
private

◆ envir()

UsageEnvironment & Medium::envir ( ) const
inlineinherited

◆ getInviteSdpReply()

char const * SIPClient::getInviteSdpReply ( ) const
inline

Definition at line 70 of file SIPClient.hh.

char * fInviteSDPDescriptionReturned
Definition: SIPClient.hh:142

References fInviteSDPDescriptionReturned.

◆ getResponse()

unsigned SIPClient::getResponse ( char *&  responseBuffer,
unsigned  responseBufferSize 
)
private

◆ getResponseCode()

unsigned SIPClient::getResponseCode ( )
private

◆ invite()

char * SIPClient::invite ( char const *  url,
Authenticator authenticator = NULL 
)

◆ invite1()

char * SIPClient::invite1 ( Authenticator authenticator)
private

◆ inviteResponseHandler()

static void SIPClient::inviteResponseHandler ( void *  clientData,
int  mask 
)
staticprivate

◆ inviteWithPassword()

char * SIPClient::inviteWithPassword ( char const *  url,
char const *  username,
char const *  password 
)

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTSPClient()

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

◆ isRTSPServer()

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

◆ isServerMediaSession()

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

◆ isSink()

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName()

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited

◆ name()

char const * Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

61{return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83

References Medium::fMediumName.

◆ nextTask()

TaskToken & Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

77 {
78 return fNextTask;
79 }
TaskToken fNextTask
Definition: Media.hh:84

References Medium::fNextTask.

◆ parseResponseCode()

Boolean SIPClient::parseResponseCode ( char const *  line,
unsigned &  responseCode 
)
private

◆ parseSIPURL()

static Boolean SIPClient::parseSIPURL ( UsageEnvironment env,
char const *  url,
NetAddress address,
portNumBits portNum 
)
static

◆ parseSIPURLUsernamePassword()

static Boolean SIPClient::parseSIPURLUsernamePassword ( char const *  url,
char *&  username,
char *&  password 
)
static

◆ processURL()

Boolean SIPClient::processURL ( char const *  url)
private

◆ reset()

void SIPClient::reset ( )
private

◆ sendACK()

Boolean SIPClient::sendACK ( )

◆ sendBYE()

Boolean SIPClient::sendBYE ( )

◆ sendINVITE()

Boolean SIPClient::sendINVITE ( )
private

◆ sendRequest()

Boolean SIPClient::sendRequest ( char const *  requestString,
unsigned  requestLength 
)
private

◆ setClientStartPortNum()

void SIPClient::setClientStartPortNum ( portNumBits  clientStartPortNum)
inline

Definition at line 48 of file SIPClient.hh.

48 {
49 fClientStartPortNum = clientStartPortNum;
50 }
portNumBits fClientStartPortNum
Definition: SIPClient.hh:133

References fClientStartPortNum.

◆ setProxyServer()

void SIPClient::setProxyServer ( struct sockaddr_storage const &  proxyServerAddress,
portNumBits  proxyServerPortNum 
)

◆ setUserAgentString()

void SIPClient::setUserAgentString ( char const *  userAgentName)

◆ timerAHandler()

static void SIPClient::timerAHandler ( void *  clientData)
staticprivate

◆ timerBHandler()

static void SIPClient::timerBHandler ( void *  clientData)
staticprivate

◆ timerDHandler()

static void SIPClient::timerDHandler ( void *  clientData)
staticprivate

Field Documentation

◆ fApplicationName

char const* SIPClient::fApplicationName
private

Definition at line 118 of file SIPClient.hh.

◆ fApplicationNameSize

unsigned SIPClient::fApplicationNameSize
private

Definition at line 119 of file SIPClient.hh.

◆ fCallId

unsigned SIPClient::fCallId
private

Definition at line 134 of file SIPClient.hh.

◆ fClientStartPortNum

portNumBits SIPClient::fClientStartPortNum
private

Definition at line 133 of file SIPClient.hh.

Referenced by setClientStartPortNum().

◆ fCSeq

unsigned SIPClient::fCSeq
private

Definition at line 117 of file SIPClient.hh.

◆ fDesiredAudioRTPPayloadFormat

unsigned char SIPClient::fDesiredAudioRTPPayloadFormat
private

Definition at line 113 of file SIPClient.hh.

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fEventLoopStopFlag

char SIPClient::fEventLoopStopFlag
private

Definition at line 147 of file SIPClient.hh.

◆ fFromTag

unsigned SIPClient::fFromTag
private

Definition at line 134 of file SIPClient.hh.

◆ fInviteClientState

inviteClientState SIPClient::fInviteClientState
private

Definition at line 146 of file SIPClient.hh.

◆ fInviteCmd

char* SIPClient::fInviteCmd
private

Definition at line 143 of file SIPClient.hh.

◆ fInviteCmdSize

unsigned SIPClient::fInviteCmdSize
private

Definition at line 144 of file SIPClient.hh.

◆ fInviteSDPDescription

char* SIPClient::fInviteSDPDescription
private

Definition at line 141 of file SIPClient.hh.

◆ fInviteSDPDescriptionReturned

char* SIPClient::fInviteSDPDescriptionReturned
private

Definition at line 142 of file SIPClient.hh.

Referenced by getInviteSdpReply().

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fMIMESubtype

char* SIPClient::fMIMESubtype
private

Definition at line 114 of file SIPClient.hh.

◆ fMIMESubtypeSize

unsigned SIPClient::fMIMESubtypeSize
private

Definition at line 115 of file SIPClient.hh.

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fOurAddressStr

char const* SIPClient::fOurAddressStr
private

Definition at line 120 of file SIPClient.hh.

◆ fOurAddressStrSize

unsigned SIPClient::fOurAddressStrSize
private

Definition at line 121 of file SIPClient.hh.

◆ fOurPortNum

portNumBits SIPClient::fOurPortNum
private

Definition at line 122 of file SIPClient.hh.

◆ fOurSocket

Groupsock* SIPClient::fOurSocket
private

Definition at line 123 of file SIPClient.hh.

◆ fServerAddress

struct sockaddr_storage SIPClient::fServerAddress
private

Definition at line 130 of file SIPClient.hh.

◆ fServerAddressIsSet

Boolean SIPClient::fServerAddressIsSet
private

Definition at line 131 of file SIPClient.hh.

◆ fServerPortNum

portNumBits SIPClient::fServerPortNum
private

Definition at line 132 of file SIPClient.hh.

◆ fT1

unsigned const SIPClient::fT1
private

Definition at line 99 of file SIPClient.hh.

◆ fTimerA

TaskToken SIPClient::fTimerA
private

Definition at line 95 of file SIPClient.hh.

◆ fTimerACount

unsigned SIPClient::fTimerACount
private

Definition at line 101 of file SIPClient.hh.

◆ fTimerALen

unsigned SIPClient::fTimerALen
private

Definition at line 100 of file SIPClient.hh.

◆ fTimerB

TaskToken SIPClient::fTimerB
private

Definition at line 95 of file SIPClient.hh.

◆ fTimerD

TaskToken SIPClient::fTimerD
private

Definition at line 95 of file SIPClient.hh.

◆ fToTagStr

char const* SIPClient::fToTagStr
private

Definition at line 135 of file SIPClient.hh.

◆ fToTagStrSize

unsigned SIPClient::fToTagStrSize
private

Definition at line 136 of file SIPClient.hh.

◆ fURL

char const* SIPClient::fURL
private

Definition at line 128 of file SIPClient.hh.

◆ fURLSize

unsigned SIPClient::fURLSize
private

Definition at line 129 of file SIPClient.hh.

◆ fUserAgentHeaderStr

char* SIPClient::fUserAgentHeaderStr
private

Definition at line 124 of file SIPClient.hh.

◆ fUserAgentHeaderStrLen

unsigned SIPClient::fUserAgentHeaderStrLen
private

Definition at line 125 of file SIPClient.hh.

◆ fUserName

char const* SIPClient::fUserName
private

Definition at line 138 of file SIPClient.hh.

◆ fUserNameSize

unsigned SIPClient::fUserNameSize
private

Definition at line 139 of file SIPClient.hh.

◆ fValidAuthenticator

Authenticator SIPClient::fValidAuthenticator
private

Definition at line 137 of file SIPClient.hh.

◆ fVerbosityLevel

int SIPClient::fVerbosityLevel
private

Definition at line 116 of file SIPClient.hh.

◆ fWorkingAuthenticator

Authenticator* SIPClient::fWorkingAuthenticator
private

Definition at line 145 of file SIPClient.hh.


The documentation for this class was generated from the following file: