1
/* (C) 2008 The Measurement Factory */
3
#ifndef ECAP__ADAPTER_XACTION_H
4
#define ECAP__ADAPTER_XACTION_H
6
#include <libecap/common/call.h>
7
#include <libecap/common/area.h>
8
#include <libecap/common/options.h>
13
// adapter transaction is responsible for adapting a single message
14
// it is created by adapter::Service::makeXaction and destroyed by
15
// the host either before calling start() or after calling stop()
16
class Xaction: public Callable, public Options {
21
virtual void start() = 0;
22
virtual void stop() = 0;
24
// adapted body transmission control
25
virtual void abDiscard() = 0; // host will not look at ab at all
26
virtual void abMake() = 0; // host may look at ab
27
virtual void abMakeMore() = 0; // host must have more ab
28
virtual void abStopMaking() = 0; // host no longer needs ab
29
virtual void abPause() {} // ignored by default
30
virtual void abResume() {} // ignored iff abPause is
32
// adapted body content extraction and consumption
33
virtual Area abContent(size_type offset, size_type size) = 0;
34
virtual void abContentShift(size_type size) = 0; // first size bytes
36
// virgin body state notification
37
virtual void noteVbContentDone(bool atEnd) = 0; // successful or not
38
virtual void noteVbContentAvailable() = 0;
41
} // namespace adapter
42
} // namespace libecap