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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6507 - (show annotations) (download)
Tue Aug 15 17:01:21 2006 UTC (13 years, 3 months ago) by sgodin
File MIME type: text/plain
File size: 4986 byte(s)
- changed ExpiresCategory.cxx to be an UInt32 so that Expires parameter can handle up to 2^32-1 as in RFC
- modified dum so that expiration values use UInt32 instead of int for storage

1 #if !defined(RESIP_PUBLICATIONHANDLER_HXX)
2 #define RESIP_PUBLICATIONHANDLER_HXX
3
4 #include "resip/dum/Handles.hxx"
5 #include "resip/stack/Mime.hxx"
6
7 namespace resip
8 {
9
10 class ClientPublication;
11 class ServerPublication;
12 class SipMessage;
13 class SecurityAttributes;
14
15 class ClientPublicationHandler
16 {
17 public:
18 virtual ~ClientPublicationHandler() {}
19
20 /// Called when the publication succeeds or each time it is sucessfully
21 /// refreshed.
22 virtual void onSuccess(ClientPublicationHandle, const SipMessage& status)=0;
23
24 //publication was successfully removed
25 virtual void onRemove(ClientPublicationHandle, const SipMessage& status)=0;
26
27 //call on failure. The usage will be destroyed. Note that this may not
28 //necessarily be 4xx...a malformed 200, etc. could also reach here.
29 virtual void onFailure(ClientPublicationHandle, const SipMessage& status)=0;
30
31 /// call on Retry-After failure.
32 /// return values: -1 = fail, 0 = retry immediately, N = retry in N seconds
33 virtual int onRequestRetry(ClientPublicationHandle, int retrySeconds, const SipMessage& status)=0;
34
35 // ?dcm? -- when should this be called
36 virtual void onStaleUpdate(ClientPublicationHandle, const SipMessage& /*status*/)
37 {}
38 };
39
40 class ServerPublicationHandler
41 {
42 public:
43 virtual ~ServerPublicationHandler() {}
44
45 virtual void onInitial(ServerPublicationHandle,
46 const Data& etag,
47 const SipMessage& pub,
48 const Contents* contents,
49 const SecurityAttributes* attrs,
50 UInt32 expires)=0;
51 virtual void onExpired(ServerPublicationHandle, const Data& etag)=0;
52 virtual void onRefresh(ServerPublicationHandle, const Data& etag,
53 const SipMessage& pub,
54 const Contents* contents,
55 const SecurityAttributes* attrs,
56 UInt32 expires)=0;
57 virtual void onUpdate(ServerPublicationHandle,
58 const Data& etag,
59 const SipMessage& pub,
60 const Contents* contents,
61 const SecurityAttributes* attrs,
62 UInt32 expires)=0;
63 virtual void onRemoved(ServerPublicationHandle,
64 const Data& etag,
65 const SipMessage& pub,
66 UInt32 expires)=0;
67
68 const Mimes& getSupportedMimeTypes() const;
69 };
70
71 }
72
73 #endif
74
75 /* ====================================================================
76 * The Vovida Software License, Version 1.0
77 *
78 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
79 *
80 * Redistribution and use in source and binary forms, with or without
81 * modification, are permitted provided that the following conditions
82 * are met:
83 *
84 * 1. Redistributions of source code must retain the above copyright
85 * notice, this list of conditions and the following disclaimer.
86 *
87 * 2. Redistributions in binary form must reproduce the above copyright
88 * notice, this list of conditions and the following disclaimer in
89 * the documentation and/or other materials provided with the
90 * distribution.
91 *
92 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
93 * and "Vovida Open Communication Application Library (VOCAL)" must
94 * not be used to endorse or promote products derived from this
95 * software without prior written permission. For written
96 * permission, please contact vocal@vovida.org.
97 *
98 * 4. Products derived from this software may not be called "VOCAL", nor
99 * may "VOCAL" appear in their name, without prior written
100 * permission of Vovida Networks, Inc.
101 *
102 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
103 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
104 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
105 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
106 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
107 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
108 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
109 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
110 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
111 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
112 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
113 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
114 * DAMAGE.
115 *
116 * ====================================================================
117 *
118 * This software consists of voluntary contributions made by Vovida
119 * Networks, Inc. and many individuals on behalf of Vovida Networks,
120 * Inc. For more information on Vovida Networks, Inc., please see
121 * <http://www.vovida.org/>.
122 *
123 */

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