5 #ifndef __XMPP_CHANNEL_INTERFACE_H__
6 #define __XMPP_CHANNEL_INTERFACE_H__
8 #include <boost/function.hpp>
9 #include <boost/system/error_code.hpp>
34 typedef boost::function<void(const boost::system::error_code &)>
36 typedef boost::function<
39 typedef boost::function<bool(
const std::string &,
45 typedef boost::function<bool(
const std::string &,
55 virtual bool Send(
const uint8_t *msg,
size_t msg_size,
58 return Send(msg, msg_size,
id, cb);
68 virtual void Close() = 0;
69 virtual const std::string &
ToString()
const = 0;
70 virtual const std::string &
FromString()
const = 0;
71 virtual std::string
StateName()
const = 0;
74 virtual std::string
LastEvent()
const = 0;
75 virtual uint32_t
rx_open()
const = 0;
76 virtual uint32_t
rx_close()
const = 0;
79 virtual uint32_t
tx_open()
const = 0;
80 virtual uint32_t
tx_close()
const = 0;
84 virtual std::string
LastFlap()
const = 0;
86 virtual std::string
AuthType()
const = 0;
91 virtual bool LastSent(time_t duration)
const = 0;
94 #endif // __XMPP_CHANNEL_INTERFACE_H__
virtual const XmppConnection * connection() const =0
virtual void RegisterReceive(xmps::PeerId, ReceiveCb)=0
virtual void RegisterTxMessageTraceCallback(TxMessageTraceCb cb)=0
boost::function< void(const boost::system::error_code &)> SendReadyCb
virtual xmps::PeerState GetPeerState() const =0
virtual int GetTaskInstance() const =0
boost::function< bool(const std::string &, int, int, const std::string &, const XmppStanza::XmppMessage *msg) > RxMessageTraceCb
virtual std::string AuthType() const =0
virtual bool Send(const uint8_t *, size_t, xmps::PeerId, SendReadyCb)=0
virtual std::string LastStateChangeAt() const =0
virtual void RegisterReferer(xmps::PeerId)
virtual bool LastReceived(time_t duration) const =0
virtual uint32_t rx_update() const =0
virtual std::string StateName() const =0
virtual uint32_t tx_keepalive() const =0
virtual bool Send(const uint8_t *msg, size_t msg_size, const std::string *msg_str, xmps::PeerId id, SendReadyCb cb)
virtual void RegisterRxMessageTraceCallback(RxMessageTraceCb cb)=0
virtual std::string LastEvent() const =0
virtual const std::string & ToString() const =0
virtual void UnRegisterReceive(xmps::PeerId)=0
virtual std::string LastStateName() const =0
virtual const std::string & FromString() const =0
string PeerIdToName(PeerId id)
virtual uint32_t FlapCount() const =0
virtual bool LastSent(time_t duration) const =0
boost::function< bool(const std::string &, int, int, const std::string &, const XmppStanza::XmppMessage *msg) > TxMessageTraceCb
boost::function< void(const XmppStanza::XmppMessage *, xmps::PeerState state) > ReceiveCb
virtual uint32_t tx_close() const =0
virtual uint32_t rx_open() const =0
virtual void UnRegisterWriteReady(xmps::PeerId id)=0
virtual void UnRegisterReferer(xmps::PeerId)
virtual uint32_t tx_update() const =0
virtual std::string PeerAddress() const =0
virtual uint32_t tx_open() const =0
virtual uint32_t rx_close() const =0
virtual uint32_t rx_keepalive() const =0
virtual std::string LastFlap() const =0