H323PeerElement Class Reference

#include <peclient.h>

Inheritance diagram for H323PeerElement:

H323_AnnexG H323Transactor List of all members.

Public Types

enum  Error {
  Confirmed, Rejected, NoResponse, NoServiceRelationship,
  ServiceRelationshipReestablished
}
enum  { LocalServiceRelationshipOrdinal = 0, NoServiceRelationshipOrdinal = 1, RemoteServiceRelationshipOrdinal = 2 }

Public Member Functions

PSafePtr< H323PeerElementDescriptorGetFirstDescriptor (PSafetyMode mode=PSafeReference)
PSafePtr< H323PeerElementServiceRelationshipGetFirstLocalServiceRelationship (PSafetyMode mode=PSafeReference)
PSafePtr< H323PeerElementServiceRelationshipGetFirstRemoteServiceRelationship (PSafetyMode mode=PSafeReference)
void SetLocalName (const PString &name)
PString GetLocalName () const
void SetDomainName (const PString &name)
PString GetDomainName () const
BOOL SetOnlyServiceRelationship (const PString &peer, BOOL keepTrying=TRUE)
BOOL AddServiceRelationship (const H323TransportAddress &peer, BOOL keepTrying=TRUE)
BOOL AddServiceRelationship (const H323TransportAddress &peer, OpalGloballyUniqueID &serviceID, BOOL keepTrying=TRUE)
BOOL RemoveServiceRelationship (const OpalGloballyUniqueID &serviceID, int reason=H501_ServiceReleaseReason::e_terminated)
BOOL RemoveServiceRelationship (const H323TransportAddress &peer, int reason=H501_ServiceReleaseReason::e_terminated)
BOOL RemoveAllServiceRelationships ()
Error ServiceRequestByAddr (const H323TransportAddress &peer, OpalGloballyUniqueID &serviceID)
Error ServiceRequestByID (OpalGloballyUniqueID &serviceID)
BOOL ServiceRelease (const OpalGloballyUniqueID &serviceID, unsigned reason)
BOOL AddDescriptor (const OpalGloballyUniqueID &descriptorID, const PStringArray &aliases, const H323TransportAddressArray &transportAddrs, unsigned options=H323PeerElementDescriptor::Protocol_H323, BOOL now=FALSE)
BOOL AddDescriptor (const OpalGloballyUniqueID &descriptorID, const H225_ArrayOf_AliasAddress &aliases, const H323TransportAddressArray &transportAddrs, unsigned options=H323PeerElementDescriptor::Protocol_H323, BOOL now=FALSE)
BOOL AddDescriptor (const OpalGloballyUniqueID &descriptorID, const H225_ArrayOf_AliasAddress &aliases, const H225_ArrayOf_AliasAddress &transportAddr, unsigned options=H323PeerElementDescriptor::Protocol_H323, BOOL now=FALSE)
BOOL AddDescriptor (const OpalGloballyUniqueID &descriptorID, const POrdinalKey &creator, const H225_ArrayOf_AliasAddress &alias, const H225_ArrayOf_AliasAddress &transportAddresses, unsigned options=H323PeerElementDescriptor::Protocol_H323, BOOL now=FALSE)
BOOL AddDescriptor (const OpalGloballyUniqueID &descriptorID, const POrdinalKey &creator, const H501_ArrayOf_AddressTemplate &addressTemplates, const PTime &updateTime, BOOL now=FALSE)
BOOL DeleteDescriptor (const PString &alias, BOOL now=FALSE)
BOOL DeleteDescriptor (const H225_AliasAddress &alias, BOOL now=FALSE)
BOOL DeleteDescriptor (const OpalGloballyUniqueID &descriptorID, BOOL now=FALSE)
BOOL AccessRequest (const PString &searchAlias, PStringArray &destAliases, H323TransportAddress &transportAddress, unsigned options=H323PeerElementDescriptor::Protocol_H323)
BOOL AccessRequest (const PString &searchAlias, H225_ArrayOf_AliasAddress &destAliases, H323TransportAddress &transportAddress, unsigned options=H323PeerElementDescriptor::Protocol_H323)
BOOL AccessRequest (const H225_AliasAddress &searchAlias, H225_ArrayOf_AliasAddress &destAliases, H323TransportAddress &transportAddress, unsigned options=H323PeerElementDescriptor::Protocol_H323)
BOOL AccessRequest (const H225_AliasAddress &alias, H225_ArrayOf_AliasAddress &destAliases, H225_AliasAddress &transportAddress, unsigned options=H323PeerElementDescriptor::Protocol_H323)
BOOL UpdateDescriptor (H323PeerElementDescriptor *descriptor)
BOOL UpdateDescriptor (H323PeerElementDescriptor *descriptor, H501_UpdateInformation_updateType::Choices updateType)
Error SendUpdateDescriptorByID (const OpalGloballyUniqueID &serviceID, H323PeerElementDescriptor *descriptor, H501_UpdateInformation_updateType::Choices updateType)
Error SendUpdateDescriptorByAddr (const H323TransportAddress &peer, H323PeerElementDescriptor *descriptor, H501_UpdateInformation_updateType::Choices updateType)
Error SendAccessRequestByID (const OpalGloballyUniqueID &peerID, H501PDU &request, H501PDU &confirmPDU)
Error SendAccessRequestByAddr (const H323TransportAddress &peerAddr, H501PDU &request, H501PDU &confirmPDU)
virtual void OnAddServiceRelationship (const H323TransportAddress &)
virtual void OnRemoveServiceRelationship (const H323TransportAddress &)
virtual void OnNewDescriptor (const H323PeerElementDescriptor &)
virtual void OnUpdateDescriptor (const H323PeerElementDescriptor &)
virtual void OnRemoveDescriptor (const H323PeerElementDescriptor &)
virtual H323Transaction::Response OnServiceRequest (H501ServiceRequest &info)
virtual H323Transaction::Response OnDescriptorUpdate (H501DescriptorUpdate &info)
virtual H323Transaction::Response OnAccessRequest (H501AccessRequest &info)
BOOL OnReceiveServiceRequest (const H501PDU &pdu, const H501_ServiceRequest &pduBody)
BOOL OnReceiveServiceConfirmation (const H501PDU &pdu, const H501_ServiceConfirmation &pduBody)
BOOL OnReceiveDescriptorUpdate (const H501PDU &pdu, const H501_DescriptorUpdate &pduBody)
BOOL OnReceiveDescriptorUpdateACK (const H501PDU &pdu, const H501_DescriptorUpdateAck &pduBody)
BOOL OnReceiveAccessRequest (const H501PDU &pdu, const H501_AccessRequest &pduBody)
BOOL OnReceiveAccessConfirmation (const H501PDU &pdu, const H501_AccessConfirmation &pduBody)
BOOL OnReceiveAccessRejection (const H501PDU &pdu, const H501_AccessRejection &pduBody)
Construction
 H323PeerElement (H323EndPoint &endpoint, H323Transport *transport=NULL)
 H323PeerElement (H323EndPoint &endpoint, const H323TransportAddress &addr)
 ~H323PeerElement ()
Overrides from PObject
void PrintOn (ostream &strm) const

Protected Member Functions

void Construct ()
Error SendUpdateDescriptor (H501PDU &pdu, const H323TransportAddress &peer, H323PeerElementDescriptor *descriptor, H501_UpdateInformation_updateType::Choices updateType)
BOOL OnRemoteServiceRelationshipDisappeared (OpalGloballyUniqueID &serviceID, const H323TransportAddress &peer)
void InternalRemoveServiceRelationship (const H323TransportAddress &peer)
H323Transaction::Response HandleServiceRequest (H501ServiceRequest &info)
virtual H323PeerElementDescriptorCreateDescriptor (const OpalGloballyUniqueID &descriptorID)
virtual H323PeerElementServiceRelationshipCreateServiceRelationship ()
virtual AliasKeyCreateAliasKey (const H225_AliasAddress &alias, const OpalGloballyUniqueID &id, PINDEX pos, BOOL wild=FALSE)
void RemoveDescriptorInformation (const H501_ArrayOf_AddressTemplate &addressTemplates)

Protected Attributes

PMutex localNameMutex
PString localIdentifier
PString domainName
PSemaphore requestMutex
PThread * monitor
BOOL monitorStop
PSyncPoint monitorTickle
PMutex basePeerOrdinalMutex
PINDEX basePeerOrdinal
PSafeSortedList< H323PeerElementServiceRelationshiplocalServiceRelationships
PMutex localPeerListMutex
POrdinalSet localServiceOrdinals
PMutex remotePeerListMutex
PSafeSortedList< H323PeerElementServiceRelationshipremoteServiceRelationships
PStringToString remotePeerAddrToServiceID
StringToOrdinalKey remotePeerAddrToOrdinalKey
PSafeSortedList< H323PeerElementDescriptordescriptors
PMutex aliasMutex
AliasKeyList transportAddressToDescriptorID
AliasKeyList specificAliasToDescriptorID
AliasKeyList wildcardAliasToDescriptorID

Classes

class  AliasKey

Detailed Description

This class embodies the an H.323 AnnexG server/client

Definition at line 349 of file peclient.h.


Member Enumeration Documentation

enum H323PeerElement::Error

Enumerator:
Confirmed 
Rejected 
NoResponse 
NoServiceRelationship 
ServiceRelationshipReestablished 

Definition at line 371 of file peclient.h.

anonymous enum

Enumerator:
LocalServiceRelationshipOrdinal 
NoServiceRelationshipOrdinal 
RemoteServiceRelationshipOrdinal 

Definition at line 379 of file peclient.h.


Constructor & Destructor Documentation

H323PeerElement::H323PeerElement ( H323EndPoint endpoint,
H323Transport transport = NULL 
)

Create a new client.

Parameters:
endpoint  Endpoint gatekeeper is associated with.

Definition at line 318 of file peclient.cxx.

References Construct().

H323PeerElement::H323PeerElement ( H323EndPoint endpoint,
const H323TransportAddress addr 
)

Parameters:
endpoint  Endpoint gatekeeper is associated with.

Definition at line 325 of file peclient.cxx.

References Construct().

H323PeerElement::~H323PeerElement (  ) 

Destroy client.

Definition at line 349 of file peclient.cxx.

References monitor, monitorStop, monitorTickle, and H323Transactor::StopChannel().


Member Function Documentation

void H323PeerElement::PrintOn ( ostream &  strm  )  const

Print the name of the peer element.

Parameters:
strm  Stream to print to.

Reimplemented from H323_AnnexG.

Definition at line 387 of file peclient.cxx.

References localIdentifier, and H323Transactor::PrintOn().

BOOL H323PeerElement::SetOnlyServiceRelationship ( const PString &  peer,
BOOL  keepTrying = TRUE 
)

Send a service request

Definition at line 506 of file peclient.cxx.

References AddServiceRelationship(), GetFirstRemoteServiceRelationship(), RemoveAllServiceRelationships(), and RemoveServiceRelationship().

BOOL H323PeerElement::ServiceRelease ( const OpalGloballyUniqueID serviceID,
unsigned  reason 
)

Send a service release

Definition at line 860 of file peclient.cxx.

References H501PDU::BuildServiceRelease(), H323Transactor::GetNextSequenceNumber(), InternalRemoveServiceRelationship(), H501_Message::m_common, H501_ServiceRelease::m_reason, H501_MessageCommonInfo::m_serviceID, OnRemoveServiceRelationship(), remoteServiceRelationships, and H323Transactor::WriteTo().

Referenced by RemoveServiceRelationship().

BOOL H323PeerElement::DeleteDescriptor ( const PString &  alias,
BOOL  now = FALSE 
)

Remove a descriptor from the local table

Definition at line 1117 of file peclient.cxx.

Referenced by DeleteDescriptor(), and H323GatekeeperServer::RemoveEndPoint().

BOOL H323PeerElement::AccessRequest ( const PString &  searchAlias,
PStringArray &  destAliases,
H323TransportAddress transportAddress,
unsigned  options = H323PeerElementDescriptor::Protocol_H323 
)

Request access to an alias

Definition at line 1320 of file peclient.cxx.

Referenced by AccessRequest(), and H323GatekeeperServer::TranslateAliasAddress().


The documentation for this class was generated from the following files:
Generated on Thu Oct 25 13:45:30 2007 for h323plus by  doxygen 1.5.2