1 /* $Id: package.hpp,v 1.25 2006-09-26 13:02:50 marc 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"
19 namespace metaproxy_1 {
26 std::ostream& operator<<(std::ostream& os, metaproxy_1::Package& p);
29 namespace metaproxy_1 {
37 Package(metaproxy_1::Session &session,
38 const metaproxy_1::Origin &origin);
40 /// shallow copy constructor which only copies the filter chain info
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
53 Origin origin() const;
55 /// set function - left val in assignment
58 /// set function - can be chained
59 Package & origin(const Origin & origin);
61 /// set function - can be chained
62 Package & router(const Router &router);
64 yazpp_1::GDU &request();
66 yazpp_1::GDU &response();
68 /// get function - right val in assignment
69 Session session() const;
75 RoutePos *m_route_pos;
79 yazpp_1::GDU m_request_gdu;
80 yazpp_1::GDU m_response_gdu;
90 * indent-tabs-mode: nil
91 * c-file-style: "stroustrup"
93 * vim: shiftwidth=4 tabstop=8 expandtab