* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: cql2rpn.h,v 1.1 2004-03-29 22:46:50 adam Exp $
+ * $Id: cql2rpn.h,v 1.2 2005-06-02 06:40:20 adam Exp $
*/
#include <yaz/cql.h>
#include <yaz/z-core.h>
+namespace yazpp_1 {
class YAZ_EXPORT Yaz_cql2rpn {
public:
Yaz_cql2rpn();
private:
cql_transform_t m_transform;
};
+};
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: ir-assoc.h,v 1.3 2003-12-16 14:17:01 adam Exp $
+ * $Id: ir-assoc.h,v 1.4 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz++/z-assoc.h>
#include <yaz++/z-query.h>
+namespace yazpp_1 {
/** Information Retrieval Assocation.
This object implements the client - and server role of a generic
Z39.50 Association.
int m_lastReceived;
int m_log;
};
+};
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: pdu-assoc.h,v 1.5 2003-10-23 11:45:08 adam Exp $
+ * $Id: pdu-assoc.h,v 1.6 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_PDU_ASSOC_INCLUDED
#include <yaz++/socket-observer.h>
#include <yaz++/pdu-observer.h>
+namespace yazpp_1 {
/** Simple Protocol Data Unit Assocation.
This object sends - and receives PDU's using the COMSTACK
network utility. To use the association in client role, use
the method connect. The server role is initiated by using the
listen method.
*/
-class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver {
+class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, yazpp_1::IYazSocketObserver {
friend class Yaz_PDU_AssocThread;
private:
enum {
Yaz_PDU_Assoc *m_children;
Yaz_PDU_Assoc *m_next;
COMSTACK m_cs;
- IYazSocketObservable *m_socketObservable;
+ yazpp_1::IYazSocketObservable *m_socketObservable;
IYaz_PDU_Observer *m_PDU_Observer;
char *m_input_buf;
int m_input_len;
int *m_destroyed;
int m_idleTime;
int m_log;
- void init(IYazSocketObservable *socketObservable);
+ void init(yazpp_1::IYazSocketObservable *socketObservable);
public:
COMSTACK comstack(const char *type_and_host, void **vp);
/// Create object using specified socketObservable
- Yaz_PDU_Assoc(IYazSocketObservable *socketObservable);
+ Yaz_PDU_Assoc(yazpp_1::IYazSocketObservable *socketObservable);
/// Create Object using existing comstack
- Yaz_PDU_Assoc(IYazSocketObservable *socketObservable,
+ Yaz_PDU_Assoc(yazpp_1::IYazSocketObservable *socketObservable,
COMSTACK cs);
/// Close socket and destroy object.
/// virtual ~Yaz_PDU_Assoc();
class YAZ_EXPORT Yaz_PDU_AssocThread : public Yaz_PDU_Assoc {
public:
- Yaz_PDU_AssocThread(IYazSocketObservable *socketObservable);
+ Yaz_PDU_AssocThread(yazpp_1::IYazSocketObservable *socketObservable);
private:
void childNotify(COMSTACK cs);
};
+};
+
#endif
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: pdu-observer.h,v 1.4 2003-10-23 11:45:08 adam Exp $
+ * $Id: pdu-observer.h,v 1.5 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_PDU_OBSERVER_H
#define YAZ_PDU_OBSERVER_H
+namespace yazpp_1 {
+
class IYaz_PDU_Observer;
/** Protocol Data Unit Observable.
virtual IYaz_PDU_Observer *sessionNotify(
IYaz_PDU_Observable *the_PDU_Observable, int fd) = 0;
};
+};
#endif
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: query.h,v 1.1 2002-10-09 12:50:26 adam Exp $
+ * $Id: query.h,v 1.2 2005-06-02 06:40:21 adam Exp $
*/
-
+namespace yazpp_1 {
/** Query
Generic Query.
*/
/// Print query in buffer described by str and len
virtual void print (char *str, int len) = 0;
};
-
+};
* Copyright (c) 2002-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: record-cache.h,v 1.1 2004-03-29 22:46:50 adam Exp $
+ * $Id: record-cache.h,v 1.2 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/nmem.h>
#include <yaz/z-core.h>
+namespace yazpp_1 {
class Yaz_RecordCache_Entry;
class YAZ_EXPORT Yaz_RecordCache {
Z_RecordComposition *comp);
int m_max_size;
};
+};
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: socket-manager.h,v 1.3 2004-01-05 11:31:04 adam Exp $
+ * $Id: socket-manager.h,v 1.4 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_SOCKET_MANAGER_INCLUDED
#include <yaz++/socket-observer.h>
#include <time.h>
+namespace yazpp_1 {
+
/** Simple Socket Manager.
Implements a stand-alone simple model that uses select(2) to
observe socket events.
virtual ~Yaz_SocketManager();
};
+};
#endif
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: socket-observer.h,v 1.3 2005-05-20 21:28:55 adam Exp $
+ * $Id: socket-observer.h,v 1.4 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_SOCKET_OBSERVER_H
#define YAZ_SOCKET_OBSERVE_TIMEOUT 8
#include <yaz/yconfig.h>
+
+namespace yazpp_1 {
+
/**
Forward reference
*/
virtual void socketNotify(int event) = 0;
};
+};
#endif
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: z-assoc.h,v 1.6 2003-12-16 14:17:01 adam Exp $
+ * $Id: z-assoc.h,v 1.7 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_Z_ASSOC_INCLUDED
#include <yaz/odr.h>
#include <yaz++/pdu-observer.h>
+namespace yazpp_1 {
/** Z39.50 Assocation.
This object implements the client - and server role of a generic
Z39.50 Association.
char *m_hostname;
int m_APDU_yazlog;
};
+};
#endif
* Copyright (c) 2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: z-databases.h,v 1.1 2002-10-09 12:50:26 adam Exp $
+ * $Id: z-databases.h,v 1.2 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/proto.h>
+namespace yazpp_1 {
/** Z39.50 Databases list
*/
class YAZ_EXPORT Yaz_Z_Databases {
int m_num;
NMEM nmem;
};
+};
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: z-query.h,v 1.3 2003-10-03 13:01:42 adam Exp $
+ * $Id: z-query.h,v 1.4 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/proto.h>
#include <yaz++/query.h>
+namespace yazpp_1 {
/** Z39.50 Query
RPN, etc.
*/
WRBUF zquery2pquery(Z_Query *q);
void pr_term(WRBUF wbuf, char *buf, int len);
};
+};
* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: z-server.h,v 1.5 2005-05-17 20:34:36 adam Exp $
+ * $Id: z-server.h,v 1.6 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz++/z-assoc.h>
+namespace yazpp_1 {
+
class Yaz_Z_Server;
class YAZ_EXPORT Yaz_Z_ServerUtility {
public:
const char *get_record(size_t position);
};
+};
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-cql2rpn.cpp,v 1.6 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-cql2rpn.cpp,v 1.7 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/log.h>
#include <yaz/pquery.h>
#include <yaz++/cql2rpn.h>
+using namespace yazpp_1;
+
Yaz_cql2rpn::Yaz_cql2rpn()
{
m_transform = 0;
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-ir-assoc.cpp,v 1.23 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-ir-assoc.cpp,v 1.24 2005-06-02 06:40:21 adam Exp $
*/
#include <assert.h>
#include <yaz/log.h>
#include <yaz++/ir-assoc.h>
+using namespace yazpp_1;
+
Yaz_IR_Assoc::Yaz_IR_Assoc(IYaz_PDU_Observable *the_PDU_Observable)
: Yaz_Z_Assoc(the_PDU_Observable)
{
* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-marc-sample.cpp,v 1.7 2005-05-17 20:34:36 adam Exp $
+ * $Id: yaz-marc-sample.cpp,v 1.8 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz++/z-server.h>
+using namespace yazpp_1;
+
static const char *marc_records[] = {
"\x30\x30\x33\x36\x36\x6E\x61\x6D\x20\x20\x32\x32\x30\x30\x31\x36"
"\x39\x38\x61\x20\x34\x35\x30\x30\x30\x30\x31\x30\x30\x31\x33\x30"
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-my-client.cpp,v 1.18 2005-01-17 09:55:58 adam Exp $
+ * $Id: yaz-my-client.cpp,v 1.19 2005-06-02 06:40:21 adam Exp $
*/
#include <stdlib.h>
#endif
}
+using namespace yazpp_1;
+
class YAZ_EXPORT MyClient : public Yaz_IR_Assoc {
private:
int m_interactive_flag;
* Copyright (c) 1998-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-my-server.cpp,v 1.16 2005-05-17 13:00:56 adam Exp $
+ * $Id: yaz-my-server.cpp,v 1.17 2005-06-02 06:40:21 adam Exp $
*/
#include <stdlib.h>
#include <yaz++/pdu-assoc.h>
#include <yaz++/socket-manager.h>
+using namespace yazpp_1;
+
class MyILL : public Yaz_Facility_ILL {
public:
void ill_service (Z_ExtendedServicesRequest *req,
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-assoc-thread.cpp,v 1.9 2005-01-14 10:13:50 adam Exp $
+ * $Id: yaz-pdu-assoc-thread.cpp,v 1.10 2005-06-02 06:40:21 adam Exp $
*/
#ifdef WIN32
#include <yaz++/pdu-assoc.h>
#include <yaz++/socket-manager.h>
+using namespace yazpp_1;
+
Yaz_PDU_AssocThread::Yaz_PDU_AssocThread(
IYazSocketObservable *socketObservable)
: Yaz_PDU_Assoc(socketObservable)
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-assoc.cpp,v 1.39 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-pdu-assoc.cpp,v 1.40 2005-06-02 06:40:21 adam Exp $
*/
#include <assert.h>
#include <yaz++/pdu-assoc.h>
+using namespace yazpp_1;
void Yaz_PDU_Assoc::init(IYazSocketObservable *socketObservable)
{
* Copyright (c) 1998-2005, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-socket-manager.cpp,v 1.31 2005-01-14 10:13:50 adam Exp $
+ * $Id: yaz-socket-manager.cpp,v 1.32 2005-06-02 06:40:21 adam Exp $
*/
#ifdef WIN32
#include <winsock.h>
#include <yaz/log.h>
#include <yaz++/socket-manager.h>
+using namespace yazpp_1;
+
Yaz_SocketManager::YazSocketEntry **Yaz_SocketManager::lookupObserver(
IYazSocketObserver *observer)
{
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-assoc.cpp,v 1.35 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-z-assoc.cpp,v 1.36 2005-06-02 06:40:21 adam Exp $
*/
#include <assert.h>
#include <yaz++/z-assoc.h>
#include <yaz/otherinfo.h>
+using namespace yazpp_1;
+
int Yaz_Z_Assoc::yaz_init_func()
{
#ifndef WIN32
* Copyright (c) 2002-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-cache.cpp,v 1.11 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-z-cache.cpp,v 1.12 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/log.h>
#include <yaz/proto.h>
#include <yaz++/record-cache.h>
-struct Yaz_RecordCache_Entry {
+using namespace yazpp_1;
+
+struct yazpp_1::Yaz_RecordCache_Entry {
int m_offset;
Z_NamePlusRecord *m_record;
Z_RecordComposition *m_comp;
* Copyright (c) 2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-databases.cpp,v 1.4 2002-10-09 12:50:26 adam Exp $
+ * $Id: yaz-z-databases.cpp,v 1.5 2005-06-02 06:40:21 adam Exp $
*/
#include <string.h>
#include <yaz++/z-databases.h>
+using namespace yazpp_1;
+
Yaz_Z_Databases::Yaz_Z_Databases()
{
nmem = nmem_create ();
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-query.cpp,v 1.15 2003-12-20 22:42:53 adam Exp $
+ * $Id: yaz-z-query.cpp,v 1.16 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz++/z-query.h>
#include <yaz/pquery.h>
+using namespace yazpp_1;
+
Yaz_Z_Query::Yaz_Z_Query()
{
odr_encode = odr_createmem (ODR_ENCODE);
* Copyright (c) 2000-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server-ill.cpp,v 1.11 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-z-server-ill.cpp,v 1.12 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/log.h>
#include <yaz++/z-server.h>
+using namespace yazpp_1;
+
int Yaz_Facility_ILL::init(Yaz_Z_Server *s, Z_InitRequest *initRequest,
Z_InitResponse *initResponse)
{
* Copyright (c) 2000-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server-sr.cpp,v 1.8 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-z-server-sr.cpp,v 1.9 2005-06-02 06:40:21 adam Exp $
*
*/
#include <yaz/log.h>
#include <yaz++/z-server.h>
+using namespace yazpp_1;
+
Z_Records *Yaz_Facility_Retrieval::pack_records (Yaz_Z_Server *s,
const char *resultSetName,
int start, int xnum,
* Copyright (c) 2000-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server-update.cpp,v 1.8 2005-05-17 12:59:50 adam Exp $
+ * $Id: yaz-z-server-update.cpp,v 1.9 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/log.h>
#include <yaz++/z-server.h>
+using namespace yazpp_1;
+
int Yaz_Facility_Update::init(Yaz_Z_Server *s, Z_InitRequest *initRequest,
Z_InitResponse *initResponse)
{
* Copyright (c) 2000-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server.cpp,v 1.20 2004-12-13 20:50:54 adam Exp $
+ * $Id: yaz-z-server.cpp,v 1.21 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz/log.h>
#include <yaz++/z-server.h>
+using namespace yazpp_1;
+
Yaz_Z_Server::Yaz_Z_Server(IYaz_PDU_Observable *the_PDU_Observable)
: Yaz_Z_Assoc(the_PDU_Observable)
{
* Copyright (c) 2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: zlint.h,v 1.1 2004-03-25 23:14:07 adam Exp $
+ * $Id: zlint.h,v 1.2 2005-06-02 06:40:21 adam Exp $
*/
#include <yaz++/z-assoc.h>
+using namespace yazpp_1;
+
enum Zlint_code {
TEST_FINISHED,
TEST_CONTINUE,