reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
BaseUsage.hxx
Go to the documentation of this file.
1#if !defined(RESIP_BASEUSAGE_HXX)
2#define RESIP_BASEUSAGE_HXX
3
7
8namespace resip
9{
10
11class Dialog;
12class DialogUsageManager;
13class DumTimeout;
14class Message;
15class NameAddr;
16class SipMessage;
17
18class BaseUsage : public Handled
19{
20 public:
21 class Exception final : public BaseException
22 {
23 public:
24 Exception(const Data& msg, const Data& file, int line);
25 const char* name() const noexcept override;
26 };
27
29 virtual void postDum(Message* messageForDum);
30
31 virtual void end()=0;
32 virtual EncodeStream& dump(EncodeStream& strm) const=0;
33
34 protected:
36 virtual ~BaseUsage();
37
38 virtual void dispatch(const SipMessage& msg) = 0;
39 virtual void dispatch(const DumTimeout& timer) = 0;
40
42
44 private:
45 BaseUsageHandle mHandle;
46
47 friend class DestroyUsage;
48 friend class DialogUsageManager;
49};
50
51}
52
53#endif
54
55/* ====================================================================
56 * The Vovida Software License, Version 1.0
57 *
58 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
59 *
60 * Redistribution and use in source and binary forms, with or without
61 * modification, are permitted provided that the following conditions
62 * are met:
63 *
64 * 1. Redistributions of source code must retain the above copyright
65 * notice, this list of conditions and the following disclaimer.
66 *
67 * 2. Redistributions in binary form must reproduce the above copyright
68 * notice, this list of conditions and the following disclaimer in
69 * the documentation and/or other materials provided with the
70 * distribution.
71 *
72 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
73 * and "Vovida Open Communication Application Library (VOCAL)" must
74 * not be used to endorse or promote products derived from this
75 * software without prior written permission. For written
76 * permission, please contact vocal@vovida.org.
77 *
78 * 4. Products derived from this software may not be called "VOCAL", nor
79 * may "VOCAL" appear in their name, without prior written
80 * permission of Vovida Networks, Inc.
81 *
82 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
83 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
84 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
85 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
86 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
87 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
88 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
89 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
90 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
91 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
92 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
93 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
94 * DAMAGE.
95 *
96 * ====================================================================
97 *
98 * This software consists of voluntary contributions made by Vovida
99 * Networks, Inc. and many individuals on behalf of Vovida Networks,
100 * Inc. For more information on Vovida Networks, Inc., please see
101 * <http://www.vovida.org/>.
102 *
103 */
The abstract base-class for all exceptions thrown by resip code.
const char * name() const noexcept override
Definition BaseUsage.cxx:19
virtual void end()=0
BaseUsageHandle getBaseHandle() const
Definition BaseUsage.cxx:36
virtual void dispatch(const SipMessage &msg)=0
virtual EncodeStream & dump(EncodeStream &strm) const =0
virtual void postDum(Message *messageForDum)
posts a message on dum
Definition BaseUsage.cxx:41
virtual ~BaseUsage()
Definition BaseUsage.cxx:31
virtual void dispatch(const DumTimeout &timer)=0
DialogUsageManager & mDum
Definition BaseUsage.hxx:43
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
The base-class used for message-passing.
Definition Message.hxx:21
Represents a SIP message.
dcm! – add UnusedChecking(_enum) below;
#define EncodeStream