1#if defined(HAVE_CONFIG_H)
15#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
48 for (Chain::iterator i = mChain.begin(); i != mChain.end(); ++i)
59 DebugLog(<<
"Adding new " << mName <<
" to chain: " << *(rp.get()));
61 rp->pushAddress((
short)mChain.size());
62 rp->pushAddress(mAddress);
63 rp->setChainType(mType);
64 mChain.push_back(rp.release());
79 unsigned int position=0;
93 for (; (position >=0 && position < mChain.size()); ++position)
95 DebugLog(<<
"Chain invoking " << mName <<
": " << *(mChain[position]));
97 action = mChain[position]->process(rc);
99 if (action == SkipAllChains)
101 DebugLog(<< mName <<
" aborted all chains: " << *(mChain[position]));
102 return SkipAllChains;
105 if (action == WaitingForEvent)
107 DebugLog(<< mName <<
" waiting for async response: " << *(mChain[position]));
108 return WaitingForEvent;
111 if (action == SkipThisChain)
113 DebugLog(<< mName <<
" skipping current chain: " << *(mChain[position]));
126 for(std::vector<Processor*>::iterator i=mChain.begin();i!=mChain.end();++i)
128 (**i).pushAddress(address);
136 for(std::vector<Processor*>::iterator i=mChain.begin();i!=mChain.end();++i)
138 (**i).pushAddress(address);
147 std::vector<Processor*>::iterator i;
148 for(i=mChain.begin();i!=mChain.end();++i)
150 (*i)->setChainType(type);
155ProcessorChain::onChainComplete()
158 for(Chain::iterator it = mChain.begin() ; it != mChain.end(); it++)
160 (*it)->mAddress.clear();
161 (*it)->pushAddress(i++);
#define resip_assert(x)
This file needs to work for both C and C++ code.
virtual void pushAddress(const std::vector< short > &address)
virtual void setChainType(ChainType type)
ProcessorChain(ChainType type)
virtual ~ProcessorChain()
void addProcessor(std::unique_ptr< Processor >)
virtual processor_action_t process(RequestContext &)
std::vector< short > mAddress
virtual void setName(const resip::Data &name)
virtual const resip::Data & getName() const
virtual void pushAddress(const std::vector< short > &address)
resip::Message * getCurrentEvent()
Returns the event that we are currently working on.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
The base-class used for message-passing.
This Class is used to implement a primitive form of RPC using loose XML formatting.
EncodeStream & operator<<(EncodeStream &os, const repro::Processor &rp)
dcm! – add UnusedChecking(_enum) below;
InserterPClass< T > InserterP(const T &t)
Templatized function to construct an instance of InserterClass for a container to be inserted.