sample/filter/c2i.hpp
#if !defined( _SAMPLE__FILTER__C2I_HPP_ )
#define _SAMPLE__FILTER__C2I_HPP_
#include <ace/Date_Time.h>
#include <oess_1/io/h/stream.hpp>
#include <so_4/rt/h/rt.hpp>
struct server_act_t
{
ACE_Date_Time m_client_timestamp;
ACE_Date_Time m_server_timestamp;
server_act_t() {}
server_act_t(
const ACE_Date_Time & client_timestamp,
const ACE_Date_Time & server_timestamp )
: m_client_timestamp( client_timestamp )
, m_server_timestamp( server_timestamp )
{}
};
oess_1::io::istream_t &
operator>>( oess_1::io::istream_t & s, server_act_t & o );
oess_1::io::ostream_t &
operator<<( oess_1::io::ostream_t & s, const server_act_t & o );
class c2i_t :
public so_4::rt::agent_t
{
typedef so_4::rt::agent_t base_type_t;
public :
c2i_t();
virtual ~c2i_t();
virtual const char *
so_query_type() const;
virtual void
so_on_subscription() = 0;
static const std::string &
agent_name();
static const std::string &
agent_type();
struct msg_request
{
server_act_t m_act;
msg_request();
msg_request(
const server_act_t & act );
};
struct msg_reply
{
server_act_t m_act;
ACE_Date_Time m_client_reply_time;
msg_reply();
msg_reply(
const server_act_t & act,
const ACE_Date_Time & client_reply_time );
};
};
#endif