11 #include "session.hpp"
21 std::string address; // UNIX+TCPIP
22 int port; // TCPIP only
24 Origin() : type(API) {};
30 Package(yp2::Session &session, yp2::Origin &origin)
31 : m_session(session), m_origin(origin),
32 m_filter(0), m_router(0), m_data(0) {}
34 Package & copy_filter(const Package &p) {
35 m_router = p.m_router;
36 m_filter = p.m_filter;
40 /// send Package to it's next Filter defined in Router
42 m_filter = m_router->move(m_filter, this);
44 m_filter->process(*this);
47 /// access session - left val in assignment
48 yp2::Session & session() {
52 /// get function - right val in assignment
53 unsigned int data() const {
57 /// set function - left val in assignment
58 unsigned int & data() {
62 /// set function - can be chained
63 Package & data(const unsigned int & data){
69 /// get function - right val in assignment
70 Origin origin() const {
74 /// set function - left val in assignment
79 /// set function - can be chained
80 Package & origin(const Origin & origin){
85 Package & router(const Router &router){
91 yazpp_1::GDU &request() {
95 yazpp_1::GDU &response() {
96 return m_response_gdu;
99 /// get function - right val in assignment
100 Session session() const {
108 const Filter *m_filter;
109 const Router *m_router;
112 yazpp_1::GDU m_request_gdu;
113 yazpp_1::GDU m_response_gdu;
121 * indent-tabs-mode: nil
123 * vim: shiftwidth=4 tabstop=8 expandtab