X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fmsg-thread.h;h=a8f17ecc754ab130a81756fbcd9945ac1be28aa3;hp=38f5e71d1970bcd7e38b3c9084e9965fb8f70ca9;hb=08f7a81cd0645d2ae9609f672629ea94c7d2e2ad;hpb=8dc6d0bc4ddbb2d37b3aafd93396a0e4a8e87560 diff --git a/src/msg-thread.h b/src/msg-thread.h index 38f5e71..a8f17ec 100644 --- a/src/msg-thread.h +++ b/src/msg-thread.h @@ -1,7 +1,7 @@ -/* $Id: msg-thread.h,v 1.8 2006-03-29 13:33:47 adam Exp $ - Copyright (c) 1998-2005, Index Data. +/* $Id: msg-thread.h,v 1.11 2006-03-30 14:16:34 adam Exp $ + Copyright (c) 1998-2006, Index Data. -This file is part of the yaz-proxy. +This file is part of the yazproxy. YAZ proxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -19,32 +19,24 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include -#include - -#if HAVE_DLFCN_H -#include -#endif - #include #include -class IMsg_Thread { +class YAZ_EXPORT IMsg_Thread { public: virtual IMsg_Thread *handle() = 0; virtual void result() = 0; virtual ~IMsg_Thread(); }; -class Msg_Thread_Queue_List { +class YAZ_EXPORT Msg_Thread_Queue_List { friend class Msg_Thread_Queue; private: IMsg_Thread *m_item; Msg_Thread_Queue_List *m_next; }; -class Msg_Thread_Queue { +class YAZ_EXPORT Msg_Thread_Queue { public: Msg_Thread_Queue(); void enqueue(IMsg_Thread *in); @@ -54,7 +46,8 @@ class Msg_Thread_Queue { Msg_Thread_Queue_List *m_list; }; -class Msg_Thread : public yazpp_1::ISocketObserver { +class YAZ_EXPORT Msg_Thread : public yazpp_1::ISocketObserver { + class Private; public: Msg_Thread(yazpp_1::ISocketObservable *obs, int no_threads); virtual ~Msg_Thread(); @@ -62,17 +55,8 @@ class Msg_Thread : public yazpp_1::ISocketObserver { void put(IMsg_Thread *m); IMsg_Thread *get(); void run(void *p); - int m_fd[2]; private: - yazpp_1::ISocketObservable *m_SocketObservable; - int m_no_threads; - pthread_t *m_thread_id; - Msg_Thread_Queue m_input; - Msg_Thread_Queue m_output; - pthread_mutex_t m_mutex_input_data; - pthread_cond_t m_cond_input_data; - pthread_mutex_t m_mutex_output_data; - bool m_stop_flag; + class Private *m_p; }; /*