7 #ifndef CRYPTOPP_CHANNELS_H 8 #define CRYPTOPP_CHANNELS_H 18 class MessageSwitch :
public Sink 23 void AddRoute(
unsigned int begin,
unsigned int end,
BufferedTransformation &destination,
const std::string &channel);
26 void Put(
const byte *inString,
unsigned int length);
28 void Flush(
bool completeFlush,
int propagation=-1);
30 void PutMessageEnd(
const byte *inString,
unsigned int length,
int propagation=-1);
34 typedef std::pair<BufferedTransformation *, std::string> Route;
37 RangeRoute(
unsigned int begin,
unsigned int end,
const Route &route)
38 : begin(begin), end(end), route(route) {}
39 bool operator<(
const RangeRoute &rhs)
const {
return begin < rhs.begin;}
40 unsigned int begin, end;
44 typedef std::list<RangeRoute> RouteList;
45 typedef std::list<Route> DefaultRouteList;
48 DefaultRouteList m_defaultRoutes;
49 unsigned int m_nCurrentMessage;
56 typedef std::pair<BufferedTransformation *, std::string>
Route;
57 typedef std::multimap<std::string, Route>
RouteMap;
59 typedef std::pair<BufferedTransformation *, value_ptr<std::string> >
DefaultRoute;
74 void Reset(
const std::string &channel);
78 const std::string & Channel();
98 AddDefaultRoute(destination);
102 AddDefaultRoute(destination, outChannel);
107 size_t ChannelPut2(
const std::string &channel,
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
108 size_t ChannelPutModifiable2(
const std::string &channel,
byte *begin,
size_t length,
int messageEnd,
bool blocking);
110 bool ChannelFlush(
const std::string &channel,
bool completeFlush,
int propagation=-1,
bool blocking=
true);
111 bool ChannelMessageSeriesEnd(
const std::string &channel,
int propagation=-1,
bool blocking=
true);
113 byte * ChannelCreatePutSpace(
const std::string &channel,
size_t &
size);
119 void AddRoute(
const std::string &inChannel,
BufferedTransformation &destination,
const std::string &outChannel);
120 void RemoveRoute(
const std::string &inChannel,
BufferedTransformation &destination,
const std::string &outChannel);
Classes providing basic library services.
std::pair< BufferedTransformation *, std::string > Route
#define NAMESPACE_BEGIN(x)
ChannelRouteIterator m_it
Abstract base classes that provide a uniform interface to this library.
Classes for automatic resource management.
ChannelSwitch(BufferedTransformation &destination, const std::string &outChannel)
Route input to different and/or multiple channels based on channel ID.
DefaultRouteList m_defaultRoutes
std::list< DefaultRoute > DefaultRouteList
ChannelRouteIterator(ChannelSwitch &cs)
ChannelSwitch(BufferedTransformation &destination)
const NameValuePairs & g_nullNameValuePairs
An empty set of name-value pairs.
DefaultRouteList::iterator ListIterator
std::multimap< std::string, Route > RouteMap
uint8_t const size_t const size
Implementation of BufferedTransformation's attachment interface.
std::pair< BufferedTransformation *, value_ptr< std::string > > DefaultRoute
std::vector< char * > parameters
Multiple channels support for custom signal processing.
RouteMap::iterator MapIterator
bool operator<(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
Interface for retrieving values given their names.