projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix various link to reference. Added partinfo element for reference
[metaproxy-moved-to-github.git]
/
src
/
package.hpp
diff --git
a/src/package.hpp
b/src/package.hpp
index
ee9516b
..
bbefb39
100644
(file)
--- a/
src/package.hpp
+++ b/
src/package.hpp
@@
-1,33
+1,32
@@
-/* $Id: package.hpp,v 1.14 2006-01-11 11:51:50 adam Exp $
- Copyright (c) 2005, Index Data.
+/* $Id: package.hpp,v 1.25 2006-09-26 13:02:50 marc Exp $
+ Copyright (c) 2005-2006, Index Data.
-%LICENSE%
+ See the LICENSE file for details
*/
#ifndef YP2_PACKAGE_HPP
#define YP2_PACKAGE_HPP
*/
#ifndef YP2_PACKAGE_HPP
#define YP2_PACKAGE_HPP
-#include <iostream>
-#include <stdexcept>
-#include <yaz++/gdu.h>
+#include <iosfwd>
+
+#include <yazpp/gdu.h>
#include "router.hpp"
#include "filter.hpp"
#include "session.hpp"
#include "router.hpp"
#include "filter.hpp"
#include "session.hpp"
+#include "origin.hpp"
+
+namespace metaproxy_1 {
+ class Package;
+}
-namespace yp2 {
-
- class Origin {
- enum origin_t {
- API,
- UNIX,
- TCPIP
- } type;
- std::string address; // UNIX+TCPIP
- int port; // TCPIP only
- public:
- Origin() : type(API) {};
- };
+
+namespace std
+{
+ std::ostream& operator<<(std::ostream& os, metaproxy_1::Package& p);
+}
+
+namespace metaproxy_1 {
class Package {
public:
class Package {
public:
@@
-35,8
+34,10
@@
namespace yp2 {
~Package();
~Package();
- Package(yp2::Session &session, yp2::Origin &origin);
+ Package(metaproxy_1::Session &session,
+ const metaproxy_1::Origin &origin);
+ /// shallow copy constructor which only copies the filter chain info
Package & copy_filter(const Package &p);
/// send Package to it's next Filter defined in Router
Package & copy_filter(const Package &p);
/// send Package to it's next Filter defined in Router
@@
-46,16
+47,7
@@
namespace yp2 {
void move(std::string route);
/// access session - left val in assignment
void move(std::string route);
/// access session - left val in assignment
- yp2::Session & session();
-
- /// get function - right val in assignment
- int data() const;
-
- /// set function - left val in assignment
- int & data();
-
- /// set function - can be chained
- Package & data(const int & data);
+ metaproxy_1::Session & session();
/// get function - right val in assignment
Origin origin() const;
/// get function - right val in assignment
Origin origin() const;
@@
-66,6
+58,7
@@
namespace yp2 {
/// set function - can be chained
Package & origin(const Origin & origin);
/// set function - can be chained
Package & origin(const Origin & origin);
+ /// set function - can be chained
Package & router(const Router &router);
yazpp_1::GDU &request();
Package & router(const Router &router);
yazpp_1::GDU &request();
@@
-81,13
+74,15
@@
namespace yp2 {
RoutePos *m_route_pos;
RoutePos *m_route_pos;
- int m_data;
+ //int m_data;
yazpp_1::GDU m_request_gdu;
yazpp_1::GDU m_response_gdu;
};
}
yazpp_1::GDU m_request_gdu;
yazpp_1::GDU m_response_gdu;
};
}
+
+
#endif
/*
* Local variables:
#endif
/*
* Local variables: