1 /* $Id: package.hpp,v 1.13 2006-01-09 13:53:13 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 /// access session - left val in assignment
46 yp2::Session & session();
48 /// get function - right val in assignment
51 /// set function - left val in assignment
54 /// set function - can be chained
55 Package & data(const int & data);
57 /// get function - right val in assignment
58 Origin origin() const;
60 /// set function - left val in assignment
63 /// set function - can be chained
64 Package & origin(const Origin & origin);
66 Package & router(const Router &router);
68 yazpp_1::GDU &request();
70 yazpp_1::GDU &response();
72 /// get function - right val in assignment
73 Session session() const;
79 RoutePos *m_route_pos;
83 yazpp_1::GDU m_request_gdu;
84 yazpp_1::GDU m_response_gdu;
92 * indent-tabs-mode: nil
93 * c-file-style: "stroustrup"
95 * vim: shiftwidth=4 tabstop=8 expandtab