reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ProcessorMessage.hxx
Go to the documentation of this file.
1#ifndef PROCESSOR_MESSAGE_HXX
2#define PROCESSOR_MESSAGE_HXX 1
3
6#include "repro/Processor.hxx"
7
8namespace repro
9{
10
12{
13 public:
14
16 const resip::Data& tid,
18 mTid(tid)
19 {
20 mTu = tupassed;
21 mReturnAddress = proc.getAddress();
23 mType = proc.getChainType();
24 }
25
29 {
30 mReturnAddress=orig.mReturnAddress;
31 mOriginatorAddress=orig.mOriginatorAddress;
32 mType=orig.mType;
33 }
34
36
37 void pushAddr(int addr)
38 {
39 mReturnAddress.push_back(addr);
40 }
41
42 int popAddr()
43 {
44 if(mReturnAddress.empty())
45 {
46 return 0;
47 }
48
49 int addr = mReturnAddress.back();
50 mReturnAddress.pop_back();
51 return addr;
52 }
53
54 std::vector<short>& getOriginatorAddress()
55 {
56 return mOriginatorAddress;
57 }
58
60 {
61 return mType;
62 }
63
64 virtual Message* clone() const = 0;
65
66 virtual EncodeStream& encode(EncodeStream& strm) const = 0;
68
69 virtual const resip::Data& getTransactionId() const
70 {
71 return mTid;
72 }
73
74 protected:
76 std::vector<short> mReturnAddress;
77 std::vector<short> mOriginatorAddress;
79};
80
81}
82#endif
83
84/* ====================================================================
85 * The Vovida Software License, Version 1.0
86 *
87 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
88 *
89 * Redistribution and use in source and binary forms, with or without
90 * modification, are permitted provided that the following conditions
91 * are met:
92 *
93 * 1. Redistributions of source code must retain the above copyright
94 * notice, this list of conditions and the following disclaimer.
95 *
96 * 2. Redistributions in binary form must reproduce the above copyright
97 * notice, this list of conditions and the following disclaimer in
98 * the documentation and/or other materials provided with the
99 * distribution.
100 *
101 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
102 * and "Vovida Open Communication Application Library (VOCAL)" must
103 * not be used to endorse or promote products derived from this
104 * software without prior written permission. For written
105 * permission, please contact vocal@vovida.org.
106 *
107 * 4. Products derived from this software may not be called "VOCAL", nor
108 * may "VOCAL" appear in their name, without prior written
109 * permission of Vovida Networks, Inc.
110 *
111 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
112 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
113 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
114 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
115 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
116 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
117 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
118 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
119 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
120 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
121 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
122 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
123 * DAMAGE.
124 *
125 * ====================================================================
126 *
127 * This software consists of voluntary contributions made by Vovida
128 * Networks, Inc. and many individuals on behalf of Vovida Networks,
129 * Inc. For more information on Vovida Networks, Inc., please see
130 * <http://www.vovida.org/>.
131 *
132 */
virtual const resip::Data & getTransactionId() const
std::vector< short > mOriginatorAddress
std::vector< short > mReturnAddress
virtual EncodeStream & encode(EncodeStream &strm) const =0
output the entire message to stream
ProcessorMessage(const ProcessorMessage &orig)
ProcessorMessage(const Processor &proc, const resip::Data &tid, resip::TransactionUser *tupassed)
virtual EncodeStream & encodeBrief(EncodeStream &strm) const =0
output a brief description to stream
Processor::ChainType mType
std::vector< short > & getOriginatorAddress()
Processor::ChainType chainType() const
virtual Message * clone() const =0
A base-class for messages used by applications.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
TransactionUser * mTu
Definition Message.hxx:50
The base-class for an RFC 3261 Transaction User.
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
#define EncodeStream
void list()
Definition userAdmin.cxx:66