1 /* $Id: package.cpp,v 1.17 2006-09-14 19:53:57 marc Exp $
2 Copyright (c) 2005-2006, Index Data.
4 See the LICENSE file for details
13 namespace mp = metaproxy_1;
15 mp::Package::Package()
20 mp::Package::~Package()
25 mp::Package::Package(mp::Session &session, const mp::Origin &origin)
26 : m_session(session), m_origin(origin),
32 mp::Package & mp::Package::copy_filter(const Package &p)
35 m_route_pos = p.m_route_pos->clone();
40 void mp::Package::move()
44 const filter::Base *next_filter = m_route_pos->move(0);
46 next_filter->process(*this);
50 void mp::Package::move(std::string route)
54 const char *r_cstr = route.length() ? route.c_str() : 0;
55 const filter::Base *next_filter = m_route_pos->move(r_cstr);
57 next_filter->process(*this);
62 mp::Session & mp::Package::session()
67 mp::Origin mp::Package::origin() const
72 mp::Origin & mp::Package::origin()
77 mp::Package & mp::Package::origin(const Origin & origin)
83 mp::Package & mp::Package::router(const mp::Router &router)
85 m_route_pos = router.createpos();
89 yazpp_1::GDU &mp::Package::request()
95 yazpp_1::GDU &mp::Package::response()
97 return m_response_gdu;
100 mp::Session mp::Package::session() const
105 std::ostream& std::operator<<(std::ostream& os, mp::Package& p)
107 os << p.origin() << " ";
108 os << p.session().id();
116 * indent-tabs-mode: nil
117 * c-file-style: "stroustrup"
119 * vim: shiftwidth=4 tabstop=8 expandtab