reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
UserAgentClientPublication.cxx
Go to the documentation of this file.
1#include "UserAgent.hxx"
2#include "ReconSubsystem.hxx"
4
5#include <rutil/Log.hxx>
6#include <rutil/Logger.hxx>
9
10using namespace recon;
11using namespace resip;
12using namespace std;
13
14#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
15
17: AppDialogSet(dum),
18 mUserAgent(userAgent),
19 mPublicationHandle(handle),
20 mEnded(false)
21{
22 mUserAgent.registerPublication(this);
23}
24
29
32{
33 return mPublicationHandle;
34}
35
36void
38{
39 if(!mEnded)
40 {
41 mEnded = true;
43 }
44}
45
47// ClientPublicationHandler ///////////////////////////////////////////////////
49void
51{
52 InfoLog(<<"UserAgentClientPublication::onSuccess - not implemented\n");
53}
54
55void
57{
58 InfoLog(<<"UserAgentClientPublication::onRemove - not implemented\n");
59}
60
61void
63{
64 WarningLog(<<"UserAgentClientPublication::onFailure - not implemented\n");
65}
66
67int
69{
70 InfoLog(<<"UserAgentClientPublication::onRequestRetry - not implemented\n");
71 return 30;
72}
73
74void
76{
77 InfoLog(<<"UserAgentClientPublication::onStaleUpdate - not implemented\n");
78}
79
80/* ====================================================================
81
82 Copyright (c) 2023, SIP Spectrum, Inc. http://www.sipspectrum.com
83 Copyright (c) 2007-2008, Plantronics, Inc.
84 Copyright (C) 2016, Mateus Bellomo (mateusbellomo AT gmail DOT com) https://mateusbellomo.wordpress.com/
85 All rights reserved.
86
87 Redistribution and use in source and binary forms, with or without
88 modification, are permitted provided that the following conditions are
89 met:
90
91 1. Redistributions of source code must retain the above copyright
92 notice, this list of conditions and the following disclaimer.
93
94 2. Redistributions in binary form must reproduce the above copyright
95 notice, this list of conditions and the following disclaimer in the
96 documentation and/or other materials provided with the distribution.
97
98 3. Neither the name of the author(s) nor the names of its contributors
99 may be used to endorse or promote products derived from this
100 software without specific prior written permission.
101
102 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
103 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
104 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
105 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
106 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
107 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
108 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
109 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
110 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
111 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
112 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
113
114 ==================================================================== */
#define InfoLog(args_)
Definition Logger.hxx:131
#define WarningLog(args_)
Definition Logger.hxx:134
virtual void onSuccess(resip::ClientPublicationHandle handle, const resip::SipMessage &status)
Called when the publication succeeds or each time it is sucessfully refreshed.
virtual void onRemove(resip::ClientPublicationHandle handle, const resip::SipMessage &status)
virtual void onStaleUpdate(resip::ClientPublicationHandle handle, const resip::SipMessage &status)
virtual int onRequestRetry(resip::ClientPublicationHandle handle, int retrySeconds, const resip::SipMessage &status)
call on Retry-After failure.
UserAgentClientPublication(UserAgent &userAgent, resip::DialogUsageManager &dum, unsigned int handle)
virtual void onFailure(resip::ClientPublicationHandle handle, const resip::SipMessage &status)
This class is one of two main classes of concern to an application using the UserAgent library.
Definition UserAgent.hxx:56
void unregisterPublication(UserAgentClientPublication *)
void registerPublication(UserAgentClientPublication *)
virtual void end()
Represents a SIP message.
unsigned int PublicationHandle
dcm! – add UnusedChecking(_enum) below;