|
reSIProcate/DialogUsageManager
9694
|
00001 #if !defined(RESIP_PUBLICATIONHANDLER_HXX) 00002 #define RESIP_PUBLICATIONHANDLER_HXX 00003 00004 #include "resip/dum/Handles.hxx" 00005 #include "resip/stack/Mime.hxx" 00006 00007 namespace resip 00008 { 00009 00010 class ClientPublication; 00011 class ServerPublication; 00012 class SipMessage; 00013 class SecurityAttributes; 00014 00015 class ClientPublicationHandler 00016 { 00017 public: 00018 virtual ~ClientPublicationHandler() {} 00019 00022 virtual void onSuccess(ClientPublicationHandle, const SipMessage& status)=0; 00023 00024 //publication was successfully removed 00025 virtual void onRemove(ClientPublicationHandle, const SipMessage& status)=0; 00026 00027 //call on failure. The usage will be destroyed. Note that this may not 00028 //necessarily be 4xx...a malformed 200, etc. could also reach here. 00029 virtual void onFailure(ClientPublicationHandle, const SipMessage& status)=0; 00030 00033 virtual int onRequestRetry(ClientPublicationHandle, int retrySeconds, const SipMessage& status)=0; 00034 00035 // ?dcm? -- when should this be called 00036 virtual void onStaleUpdate(ClientPublicationHandle, const SipMessage& /*status*/) 00037 {} 00038 }; 00039 00040 class ServerPublicationHandler 00041 { 00042 public: 00043 virtual ~ServerPublicationHandler() {} 00044 00045 virtual void onInitial(ServerPublicationHandle, 00046 const Data& etag, 00047 const SipMessage& pub, 00048 const Contents* contents, 00049 const SecurityAttributes* attrs, 00050 UInt32 expires)=0; 00051 virtual void onExpired(ServerPublicationHandle, const Data& etag)=0; 00052 virtual void onRefresh(ServerPublicationHandle, const Data& etag, 00053 const SipMessage& pub, 00054 const Contents* contents, 00055 const SecurityAttributes* attrs, 00056 UInt32 expires)=0; 00057 virtual void onUpdate(ServerPublicationHandle, 00058 const Data& etag, 00059 const SipMessage& pub, 00060 const Contents* contents, 00061 const SecurityAttributes* attrs, 00062 UInt32 expires)=0; 00063 virtual void onRemoved(ServerPublicationHandle, 00064 const Data& etag, 00065 const SipMessage& pub, 00066 UInt32 expires)=0; 00067 00068 const Mimes& getSupportedMimeTypes() const; 00069 }; 00070 00071 } 00072 00073 #endif 00074 00075 /* ==================================================================== 00076 * The Vovida Software License, Version 1.0 00077 * 00078 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. 00079 * 00080 * Redistribution and use in source and binary forms, with or without 00081 * modification, are permitted provided that the following conditions 00082 * are met: 00083 * 00084 * 1. Redistributions of source code must retain the above copyright 00085 * notice, this list of conditions and the following disclaimer. 00086 * 00087 * 2. Redistributions in binary form must reproduce the above copyright 00088 * notice, this list of conditions and the following disclaimer in 00089 * the documentation and/or other materials provided with the 00090 * distribution. 00091 * 00092 * 3. The names "VOCAL", "Vovida Open Communication Application Library", 00093 * and "Vovida Open Communication Application Library (VOCAL)" must 00094 * not be used to endorse or promote products derived from this 00095 * software without prior written permission. For written 00096 * permission, please contact vocal@vovida.org. 00097 * 00098 * 4. Products derived from this software may not be called "VOCAL", nor 00099 * may "VOCAL" appear in their name, without prior written 00100 * permission of Vovida Networks, Inc. 00101 * 00102 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 00103 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00104 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND 00105 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA 00106 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES 00107 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, 00108 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00109 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00110 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 00111 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00112 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00113 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00114 * DAMAGE. 00115 * 00116 * ==================================================================== 00117 * 00118 * This software consists of voluntary contributions made by Vovida 00119 * Networks, Inc. and many individuals on behalf of Vovida Networks, 00120 * Inc. For more information on Vovida Networks, Inc., please see 00121 * <http://www.vovida.org/>. 00122 * 00123 */
1.7.5.1