1 /* $Id: package.hpp,v 1.18 2006-06-19 23:54:02 adam Exp $
2 Copyright (c) 2005-2006, Index Data.
4 See the LICENSE file for details
7 #ifndef YP2_PACKAGE_HPP
8 #define YP2_PACKAGE_HPP
12 #include <yazpp/gdu.h>
16 #include "session.hpp"
18 namespace metaproxy_1 {
26 std::string address; // UNIX+TCPIP
27 int port; // TCPIP only
29 Origin() : type(API) {};
38 Package(metaproxy_1::Session &session, const
39 metaproxy_1::Origin &origin);
41 Package & copy_filter(const Package &p);
43 /// send Package to it's next Filter defined in Router
46 /// send Package to other route
47 void move(std::string route);
49 /// access session - left val in assignment
50 metaproxy_1::Session & session();
52 /// get function - right val in assignment
55 /// set function - left val in assignment
58 /// set function - can be chained
59 Package & data(const int & data);
61 /// get function - right val in assignment
62 Origin origin() const;
64 /// set function - left val in assignment
67 /// set function - can be chained
68 Package & origin(const Origin & origin);
70 Package & router(const Router &router);
72 yazpp_1::GDU &request();
74 yazpp_1::GDU &response();
76 /// get function - right val in assignment
77 Session session() const;
83 RoutePos *m_route_pos;
87 yazpp_1::GDU m_request_gdu;
88 yazpp_1::GDU m_response_gdu;
96 * indent-tabs-mode: nil
97 * c-file-style: "stroustrup"
99 * vim: shiftwidth=4 tabstop=8 expandtab