/[resiprocate]/main/resip/dum/ClientPublication.hxx
ViewVC logotype

Contents of /main/resip/dum/ClientPublication.hxx

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27