1 /* $Id: package.hpp,v 1.17 2006-06-10 14:29:12 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, metaproxy_1::Origin &origin);
40 Package & copy_filter(const Package &p);
42 /// send Package to it's next Filter defined in Router
45 /// send Package to other route
46 void move(std::string route);
48 /// access session - left val in assignment
49 metaproxy_1::Session & session();
51 /// get function - right val in assignment
54 /// set function - left val in assignment
57 /// set function - can be chained
58 Package & data(const int & data);
60 /// get function - right val in assignment
61 Origin origin() const;
63 /// set function - left val in assignment
66 /// set function - can be chained
67 Package & origin(const Origin & origin);
69 Package & router(const Router &router);
71 yazpp_1::GDU &request();
73 yazpp_1::GDU &response();
75 /// get function - right val in assignment
76 Session session() const;
82 RoutePos *m_route_pos;
86 yazpp_1::GDU m_request_gdu;
87 yazpp_1::GDU m_response_gdu;
95 * indent-tabs-mode: nil
96 * c-file-style: "stroustrup"
98 * vim: shiftwidth=4 tabstop=8 expandtab