1 /* $Id: package.hpp,v 1.21 2006-08-30 09:56:41 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"
27 std::ostream& operator<<(std::ostream& os, metaproxy_1::Origin& o);
28 std::ostream& operator<<(std::ostream& os, metaproxy_1::Package& p);
31 namespace metaproxy_1 {
35 std::operator<<(std::ostream& os, metaproxy_1::Origin& o);
42 std::string address; // UNIX+TCPIP
43 int port; // TCPIP only
45 Origin() : type(API) {};
55 Package(metaproxy_1::Session &session,
56 const metaproxy_1::Origin &origin);
58 Package & copy_filter(const Package &p);
60 /// send Package to it's next Filter defined in Router
63 /// send Package to other route
64 void move(std::string route);
66 /// access session - left val in assignment
67 metaproxy_1::Session & session();
69 /// get function - right val in assignment
72 /// set function - left val in assignment
75 /// set function - can be chained
76 Package & data(const int & data);
78 /// get function - right val in assignment
79 Origin origin() const;
81 /// set function - left val in assignment
84 /// set function - can be chained
85 Package & origin(const Origin & origin);
87 Package & router(const Router &router);
89 yazpp_1::GDU &request();
91 yazpp_1::GDU &response();
93 /// get function - right val in assignment
94 Session session() const;
100 RoutePos *m_route_pos;
104 yazpp_1::GDU m_request_gdu;
105 yazpp_1::GDU m_response_gdu;
115 * indent-tabs-mode: nil
116 * c-file-style: "stroustrup"
118 * vim: shiftwidth=4 tabstop=8 expandtab