reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ClientPublication.hxx
Go to the documentation of this file.
1#if !defined(RESIP_CLIENTPUBLICATION_HXX)
2#define RESIP_CLIENTPUBLICATION_HXX
3
5
6namespace resip
7{
8
10{
11 public:
12 ClientPublication(DialogUsageManager& dum, DialogSet& dialogSet, std::shared_ptr<SipMessage> pub);
15
18
21 const Data& getEventType() const noexcept { return mEventType; }
22 const Contents* getContents() const noexcept { return mDocument; }
23
24 //0 means the last value of Expires will be used.
25 void refresh(unsigned int expiration=0);
26 void update(const Contents* body);
27 void end() override;
28 void end(bool immediate); // If immediate is true then usage is destroyed with no further messaging
29
33 void updateCommand(const Contents* body);
34 void refreshCommand(unsigned int expiration=0);
35 virtual void endCommand(bool immediate=false); // If immediate is true then usage is destroyed with no further messaging
36
37 void dispatch(const SipMessage& msg) override;
38 void dispatch(const DumTimeout& timer) override;
39
40 EncodeStream& dump(EncodeStream& strm) const override;
41
42 protected:
43 virtual ~ClientPublication();
44 void send(std::shared_ptr<SipMessage> request) override;
45
46 private:
47 friend class DialogSet;
48
49 bool mPublished;
50 bool mWaitingForResponse;
51 bool mPendingPublish;
52 bool mPendingEnd;
53
54 std::shared_ptr<SipMessage> mPublish;
55 Data mEventType;
56 unsigned int mTimerSeq; // expected timer seq (all < are stale)
57 const Contents* mDocument;
58};
59
60}
61
62#endif
63
64/* ====================================================================
65 * The Vovida Software License, Version 1.0
66 *
67 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
68 *
69 * Redistribution and use in source and binary forms, with or without
70 * modification, are permitted provided that the following conditions
71 * are met:
72 *
73 * 1. Redistributions of source code must retain the above copyright
74 * notice, this list of conditions and the following disclaimer.
75 *
76 * 2. Redistributions in binary form must reproduce the above copyright
77 * notice, this list of conditions and the following disclaimer in
78 * the documentation and/or other materials provided with the
79
80 * distribution.
81 *
82 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
83 * and "Vovida Open Communication Application Library (VOCAL)" must
84 * not be used to endorse or promote products derived from this
85 * software without prior written permission. For written
86 * permission, please contact vocal@vovida.org.
87 *
88 * 4. Products derived from this software may not be called "VOCAL", nor
89 * may "VOCAL" appear in their name, without prior written
90 * permission of Vovida Networks, Inc.
91 *
92 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
93 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
94 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
95 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
96 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
97 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
98 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
99 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
100 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
101 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
102 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
103 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
104 * DAMAGE.
105 *
106 * ====================================================================
107 *
108 * This software consists of voluntary contributions made by Vovida
109 * Networks, Inc. and many individuals on behalf of Vovida Networks,
110 * Inc. For more information on Vovida Networks, Inc., please see
111 * <http://www.vovida.org/>.
112 *
113 */
const Contents * getContents() const noexcept
ClientPublication & operator=(ClientPublication &&)=delete
ClientPublication(const ClientPublication &)=delete
void updateCommand(const Contents *body)
Provide asynchronous method access by using command.
void refresh(unsigned int expiration=0)
void send(std::shared_ptr< SipMessage > request) override
ClientPublication & operator=(const ClientPublication &)=delete
virtual void endCommand(bool immediate=false)
Handle< ClientPublication > ClientPublicationHandle
void refreshCommand(unsigned int expiration=0)
ClientPublication(ClientPublication &&)=delete
const Data & getEventType() const noexcept
EncodeStream & dump(EncodeStream &strm) const override
void update(const Contents *body)
void dispatch(const SipMessage &msg) override
ClientPublicationHandle getHandle()
Base class for all SIP body types.
Definition Contents.hxx:51
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents a SIP message.
dcm! – add UnusedChecking(_enum) below;
#define EncodeStream