1 /* $Id: package.hpp,v 1.14 2006-01-11 11:51:50 adam Exp $
2 Copyright (c) 2005, Index Data.
7 #ifndef YP2_PACKAGE_HPP
8 #define YP2_PACKAGE_HPP
12 #include <yaz++/gdu.h>
16 #include "session.hpp"
26 std::string address; // UNIX+TCPIP
27 int port; // TCPIP only
29 Origin() : type(API) {};
38 Package(yp2::Session &session, yp2::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 yp2::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