reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
Subsystem.hxx
Go to the documentation of this file.
1#if !defined(RESIP_SUBSYSTEM_HXX)
2#define RESIP_SUBSYSTEM_HXX
3
4#include <iostream>
5#include "rutil/Data.hxx"
6#include "rutil/Log.hxx"
7
8namespace resip
9{
10
34{
35 public:
36 // Add new systems below
37 static Subsystem APP;
39 static Subsystem DNS;
40 static Subsystem DUM;
41 static Subsystem EEP;
43 static Subsystem NONE; // default subsystem
46 static Subsystem SDP;
47 static Subsystem SIP; // SIP Stack / Parser
48 static Subsystem TEST;
54
55 const Data& getSubsystem() const;
56 Log::Level getLevel() const { return mLevel; }
57 void setLevel(Log::Level level) { mLevel = level; }
58 protected:
59 explicit Subsystem(const char* rhs) : mSubsystem(rhs), mLevel(Log::None) {};
60 explicit Subsystem(const Data& rhs) : mSubsystem(rhs), mLevel(Log::None) {};
61 Subsystem& operator=(const Data& rhs);
62
65
66 friend EncodeStream& operator<<(EncodeStream& strm, const Subsystem& ss);
67};
68
70
71
72// in order to have subsystems in your application, subclass from this class
73/*
74#include "rutil/Data.hxx"
75#include "rutil/Subsystem.hxx"
76
77namespace MyNamespace
78{
79
80class Subsystem : public resip::Subsystem
81{
82 public:
83 // Add new systems below
84 static const Subsystem SPECIAL_SUBSYSTEM;
85
86 private:
87 explicit Subsystem(const char* rhs) : resip::Subsystem(rhs) {};
88 explicit Subsystem(const resip::Data& rhs);
89 Subsystem& operator=(const resip::Data& rhs);
90};
91
92}
93*/
94
95}
96
97#endif
98
99/* ====================================================================
100 * The Vovida Software License, Version 1.0
101 *
102 * Copyright (c) 2000-2005
103 *
104 * Redistribution and use in source and binary forms, with or without
105 * modification, are permitted provided that the following conditions
106 * are met:
107 *
108 * 1. Redistributions of source code must retain the above copyright
109 * notice, this list of conditions and the following disclaimer.
110 *
111 * 2. Redistributions in binary form must reproduce the above copyright
112 * notice, this list of conditions and the following disclaimer in
113 * the documentation and/or other materials provided with the
114 * distribution.
115 *
116 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
117 * and "Vovida Open Communication Application Library (VOCAL)" must
118 * not be used to endorse or promote products derived from this
119 * software without prior written permission. For written
120 * permission, please contact vocal@vovida.org.
121 *
122 * 4. Products derived from this software may not be called "VOCAL", nor
123 * may "VOCAL" appear in their name, without prior written
124 * permission of Vovida Networks, Inc.
125 *
126 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
127 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
128 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
129 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
130 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
131 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
132 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
133 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
134 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
135 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
136 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
137 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
138 * DAMAGE.
139 *
140 * ====================================================================
141 *
142 * This software consists of voluntary contributions made by Vovida
143 * Networks, Inc. and many individuals on behalf of Vovida Networks,
144 * Inc. For more information on Vovida Networks, Inc., please see
145 * <http://www.vovida.org/>.
146 *
147 */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Singleton that handles logging calls.
Definition Log.hxx:51
Class used to specify what sub-system given sections of code belong to, for use by the logging system...
Definition Subsystem.hxx:34
static Subsystem TRANSPORT
Definition Subsystem.hxx:50
static Subsystem APP
Definition Subsystem.hxx:37
static Subsystem TEST
Definition Subsystem.hxx:48
static Subsystem STATS
Definition Subsystem.hxx:51
static Subsystem EEP
Definition Subsystem.hxx:41
static Subsystem SDP
Definition Subsystem.hxx:46
static Subsystem DNS
Definition Subsystem.hxx:39
void setLevel(Log::Level level)
Definition Subsystem.hxx:57
Log::Level mLevel
Definition Subsystem.hxx:64
static Subsystem CONTENTS
Definition Subsystem.hxx:38
static Subsystem REPRO
Definition Subsystem.hxx:52
static Subsystem PRESENCE
Definition Subsystem.hxx:44
Subsystem(const Data &rhs)
Definition Subsystem.hxx:60
static Subsystem SIP
Definition Subsystem.hxx:47
static Subsystem NONE
Definition Subsystem.hxx:43
static Subsystem DUM
Definition Subsystem.hxx:40
static Subsystem TRANSACTION
Definition Subsystem.hxx:49
friend EncodeStream & operator<<(EncodeStream &strm, const Subsystem &ss)
static Subsystem PYTHON
Definition Subsystem.hxx:45
static Subsystem MEDIA
Definition Subsystem.hxx:42
const Data & getSubsystem() const
Definition Subsystem.cxx:23
Subsystem & operator=(const Data &rhs)
static Subsystem QPIDPROTON
Definition Subsystem.hxx:53
Subsystem(const char *rhs)
Definition Subsystem.hxx:59
Log::Level getLevel() const
Definition Subsystem.hxx:56
dcm! – add UnusedChecking(_enum) below;
EncodeStream & operator<<(EncodeStream &strm, const BaseException &e)
#define EncodeStream