1
#ifndef SequenceSet_hxx
2
#define SequenceSet_hxx
8
#include <boost/shared_ptr.hpp>
10
#include "tfm/TestEndPoint.hxx"
11
#include "rutil/BaseException.hxx"
12
#include "rutil/Data.hxx"
13
#include "resip/stack/ValueFifo.hxx"
15
// .dlb. add an onComplete action?
17
// container for a set of Sequences that execute together
21
friend class SequenceClass;
26
void enqueue(boost::shared_ptr<Event> event);
27
long enqueue(boost::shared_ptr<Event> event, int delay);
28
void globalFailure(const resip::Data& message);
29
void globalFailure(resip::BaseException& e);
30
bool executionFailed() const;
33
resip::Data getExplanation() const { return mExplanation; }
34
resip::Data getFileName() const { return mFileName; }
35
int getLineNumber() const { return mLineNumber; }
37
// .dlb. boy is this wrong...
42
boost::shared_ptr<SequenceSet> getHandle() { return mHandle; }
43
void release() { mHandle.reset(); }
46
void handle(boost::shared_ptr<Event> event);
47
std::list<SequenceClass*> mSequences;
48
std::set<SequenceClass*> mActiveSet;
50
void handleEvent(boost::shared_ptr<Event> event);
52
typedef resip::ValueFifo< boost::shared_ptr<Event> > EventFifo;
57
resip::Data mFileName;
59
resip::Data mExplanation;
71
boost::shared_ptr<SequenceSet> mHandle;
73
SequenceSet(const SequenceSet&);
74
SequenceSet& operator=(const SequenceSet&);
78
operator<<(EncodeStream& str, const SequenceSet& sset);
82
Copyright (c) 2005, PurpleComm, Inc.
85
Redistribution and use in source and binary forms, with or without modification,
86
are permitted provided that the following conditions are met:
88
* Redistributions of source code must retain the above copyright notice, this
89
list of conditions and the following disclaimer.
90
* Redistributions in binary form must reproduce the above copyright notice,
91
this list of conditions and the following disclaimer in the documentation
92
and/or other materials provided with the distribution.
93
* Neither the name of PurpleComm, Inc. nor the names of its contributors may
94
be used to endorse or promote products derived from this software without
95
specific prior written permission.
97
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
98
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
99
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
100
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
101
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
102
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
103
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
104
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
105
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
106
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.