1#if !defined(UserAgent_hxx)
25class UserAgentShutdownCmd;
27class UserAgentClientSubscription;
28class UserAgentClientPublication;
29class UserAgentRegistration;
362 typedef std::map<PublicationHandle, UserAgentClientPublication *>
PublicationMap;
This class is one of two main classes of concern to an application using the UserAgent library.
This class is used by non-Invite DialogSets.
This class is used by Invite DialogSets used for IM Sessions only (m=message SDP).
This class represents an IM Session remote participant.
This class is used by Invite DialogSets.
This class represent a remote participant.
This class is used by Invite DialogSets.
This class represent a remote participant.
This class is used to manage active client publications.
This class is used to manage active client subscriptions.
This class is used to manage active SIP registrations.
This class is used to provide server digest authentication capabilities.
The classes defined here are used to pass commands from the application thread to the UserAgent threa...
This class is one of two main classes of concern to an application using the UserAgent library.
virtual void onSubscriptionNotify(SubscriptionHandle handle, const resip::Data ¬ifyData)
Callback used when a subscription has received an event notification from the server.
void unregisterSubscription(UserAgentClientSubscription *)
volatile bool mDumShutdown
std::shared_ptr< UserAgentMasterProfile > mProfile
std::map< ConversationProfileHandle, UserAgentRegistration * > RegistrationMap
std::map< SubscriptionHandle, UserAgentClientSubscription * > SubscriptionMap
virtual void onApplicationTimer(unsigned int timerId, std::chrono::duration< double > duration, unsigned int seqNumber)
Callback used when an application timer expires.
std::shared_ptr< ConversationProfile > getDefaultOutgoingConversationProfile()
virtual void process(int timeoutMs)
This should be called in a loop to give process cycles to the UserAgent.
const char * sendMessage(const resip::NameAddr &destination, const resip::Data &msg, const resip::Mime &mimeType)
Used to send a MESSAGE SIP message.
void shutdown()
Used to initiate a shutdown of the useragent.
virtual void onUpdateExtension(resip::ClientSubscriptionHandle, const resip::SipMessage ¬ify, bool outOfOrder)
resip::DialogUsageManager & getDialogUsageManager()
virtual std::shared_ptr< ConversationProfile > getIncomingConversationProfile(const resip::SipMessage &msg)
void setDefaultOutgoingConversationProfile(ConversationProfileHandle handle)
Sets an existing Conversation Profile to the default profile to use for outbound calls.
static void setLogLevel(resip::Log::Level level, LoggingSubsystem subsystem=SubsystemAll)
Static method that sets the logging level for a particular subsystem, or all subsystems.
resip::Mutex mSubscriptionHandleMutex
std::shared_ptr< UserAgentMasterProfile > getUserAgentMasterProfile() const noexcept
ConversationManager * mConversationManager
SubscriptionMap mSubscriptions
void destroyPublication(PublicationHandle handle)
resip::EventStackThread mStackThread
void registerRegistration(UserAgentRegistration *)
void startup()
Starts the SIP stack thread.
resip::Mutex mPublicationHandleMutex
virtual void onSuccess(resip::ClientRegistrationHandle h, const resip::SipMessage &response)
Called when registration succeeds or each time it is successfully refreshed (manual refreshes only).
void destroyConversationProfile(ConversationProfileHandle handle)
Destroys an existing Conversation Profile.
void logDnsCache()
Used to initiate a snapshot of the existing DNS entries in the cache to the logging subsystem.
RegistrationMap mRegistrations
PublicationHandle mCurrentPublicationHandle
ConversationProfileHandle addConversationProfile(std::shared_ptr< ConversationProfile > conversationProfile, bool defaultOutgoing=true)
Adds a Conversation Profile to be managed, by the user agent.
std::map< PublicationHandle, UserAgentClientPublication * > PublicationMap
resip::EventThreadInterruptor * mEventInterruptor
void destroySubscription(SubscriptionHandle handle)
Destroys an existing subscriptions.
resip::Mutex mConversationProfileHandleMutex
PublicationHandle createPublication(const resip::Data &eventType, const resip::NameAddr &target, const resip::Data &status, unsigned int publicationTime, const resip::Mime &mimeType)
void unregisterPublication(UserAgentClientPublication *)
virtual void onUpdatePending(resip::ClientSubscriptionHandle h, const resip::SipMessage ¬ify, bool outOfOrder)
ConversationProfileHandle getNewConversationProfileHandle()
void registerSubscription(UserAgentClientSubscription *)
SubscriptionHandle createSubscription(const resip::Data &eventType, const resip::NameAddr &target, unsigned int subscriptionTime, const resip::Mime &mimeType)
Requests that the user agent create and manage an event subscription.
void unregisterRegistration(UserAgentRegistration *)
resip::SipStack & getSipStack()
resip::DialogUsageManager mDum
virtual void onNewSubscription(resip::ClientSubscriptionHandle h, const resip::SipMessage ¬ify)
ConversationProfileMap mConversationProfiles
void clearDnsCache()
Used to clear the existing DNS entries in the cache.
void addConversationProfileImpl(ConversationProfileHandle handle, std::shared_ptr< ConversationProfile > conversationProfile, bool defaultOutgoing=true)
std::shared_ptr< ConversationProfile > getConversationProfileByMediaAddress(const resip::Data &mediaAddress)
virtual void post(resip::Message *msg)
volatile bool mUserAgentShutdown
ConversationManager * getConversationManager()
Retrieves the ConversationManager passed in the constructor.
virtual void startApplicationTimer(unsigned int timerId, std::chrono::duration< double > duration, unsigned int seqNumber)
Used by an application to start a timer that is managed by the useragent.
PublicationMap mPublications
virtual void onRemove(resip::ClientPublicationHandle h, const resip::SipMessage &status)
PublicationHandle getNewPublicationHandle()
void destroySubscriptionImpl(SubscriptionHandle handle)
virtual void onTerminated(resip::ClientSubscriptionHandle h, const resip::SipMessage *notify)
SubscriptionHandle mCurrentSubscriptionHandle
ConversationProfileHandle mCurrentConversationProfileHandle
std::map< ConversationProfileHandle, std::shared_ptr< ConversationProfile > > ConversationProfileMap
SubscriptionHandle getNewSubscriptionHandle()
void setDefaultOutgoingConversationProfileImpl(ConversationProfileHandle handle)
void registerPublication(UserAgentClientPublication *)
void createPublicationImpl(PublicationHandle handle, const resip::Data &status, const resip::Data &eventType, const resip::NameAddr &target, unsigned int publicationTime, const resip::Mime &mimeType)
resip::Security * mSecurity
resip::FdPollGrp * mPollGrp
ConversationProfileHandle mDefaultOutgoingConversationProfileHandle
virtual int onRequestRetry(resip::ClientRegistrationHandle h, int retryMinimum, const resip::SipMessage &msg)
call on Retry-After failure.
virtual void onRemoved(resip::ClientRegistrationHandle h, const resip::SipMessage &response)
virtual void onUpdateActive(resip::ClientSubscriptionHandle h, const resip::SipMessage ¬ify, bool outOfOrder)
virtual void onSubscriptionTerminated(SubscriptionHandle handle, unsigned int statusCode)
Callback used when a subscription is terminated.
void destroyPublicationImpl(PublicationHandle handle)
void createSubscriptionImpl(SubscriptionHandle handle, const resip::Data &eventType, const resip::NameAddr &target, unsigned int subscriptionTime, const resip::Mime &mimeType)
virtual void onFailure(resip::ClientRegistrationHandle h, const resip::SipMessage &response)
Called if registration fails, usage will be destroyed (unless a Registration retry interval is enable...
void destroyConversationProfileImpl(ConversationProfileHandle handle)
A base-class for messages used by applications.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
This class creates a thread in which to run one or more SipStacks.
The base-class used for message-passing.
Represents the "media-type" element in the RFC 3261 grammar.
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Represents a SIP message.
This is the primary point of interaction between the app-layer and the stack.
unsigned int ConversationProfileHandle
unsigned int SubscriptionHandle
unsigned int PublicationHandle
dcm! – add UnusedChecking(_enum) below;
void(* AfterSocketCreationFuncPtr)(Socket s, int transportType, const char *file, int line)
std::mutex Mutex
A semaphore that can be locked by only one thread at a time.