LogService
libdadi: utility tools for distributed applications
 All Classes Functions Variables
SendThread.hh
00001 /****************************************************************************/
00002 /* A thread that continously empties the tools outbuffers by sending them   */
00003 /* to the corresponding toolMsgReceiver. Based on omni_thread and the orb.  */
00004 /* Attention: causes memory leaks if the orb does not exist !!              */
00005 /*                                                                          */
00006 /*  Author(s):                                                              */
00007 /*    - Georg Hoesch (hoesch@in.tum.de)                                     */
00008 /*    - Cyrille Pontvieux (cyrille.pontvieux@edu.univ-fcomte.fr)            */
00009 /*                                                                          */
00010 /*  This file is part of DIET .                                             */
00011 /*                                                                          */
00012 /*  Copyright (C) 2000-2003 ENS Lyon, LIFC, INSA, INRIA and SysFera (2000)  */
00013 /*                                                                          */
00014 /*  - Frederic.Desprez@ens-lyon.fr (Project Manager)                        */
00015 /*  - Eddy.Caron@ens-lyon.fr (Technical Manager)                            */
00016 /*  - Tech@sysfera.com (Maintainer and Technical Support)                   */
00017 /*                                                                          */
00018 /*  This software is a computer program whose purpose is to provide an      */
00019 /*  distributed logging services.                                           */
00020 /*                                                                          */
00021 /*                                                                          */
00022 /*  This software is governed by the CeCILL license under French law and    */
00023 /*  abiding by the rules of distribution of free software.  You can  use,   */
00024 /*  modify and/ or redistribute the software under the terms of the CeCILL  */
00025 /*  license as circulated by CEA, CNRS and INRIA at the following URL       */
00026 /*  "http://www.cecill.info".                                               */
00027 /*                                                                          */
00028 /*  As a counterpart to the access to the source code and  rights to copy,  */
00029 /*  modify and redistribute granted by the license, users are provided      */
00030 /*  only with a limited warranty  and the software's author,  the holder    */
00031 /*  of the economic rights,  and the successive licensors  have only        */
00032 /*  limited liability.                                                      */
00033 /*                                                                          */
00034 /*  In this respect, the user's attention is drawn to the risks             */
00035 /*  associated with loading,  using,  modifying and/or developing or        */
00036 /*  reproducing the software by the user in light of its specific status    */
00037 /*  of free software, that may mean  that it is complicated to              */
00038 /*  manipulate, and  that  also therefore means  that it is reserved for    */
00039 /*  developers and experienced professionals having in-depth computer       */
00040 /*  knowledge. Users are therefore encouraged to load and test the          */
00041 /*  software's suitability as regards their requirements in conditions      */
00042 /*  enabling the security of their systems and/or data to be ensured and,   */
00043 /*  more generally, to use and operate it in the same conditions as         */
00044 /*  regards security.                                                       */
00045 /*                                                                          */
00046 /*  The fact that you are presently reading this means that you have had    */
00047 /*  knowledge of the CeCILL license and that you accept its terms.          */
00048 /*                                                                          */
00049 /****************************************************************************/
00050 /* $Id$
00051  * $Log$
00052  * Revision 1.1  2004/01/09 11:07:12  ghoesch
00053  * Restructured the whole LogService source tree.
00054  * Added autotools make process. Cleaned up code.
00055  * Removed some testers. Ready to release.
00056  *
00057  ***************************************************************************/
00058 
00059 #ifndef _SENDTHREAD_HH_
00060 #define _SENDTHREAD_HH_
00061 
00062 #include <omnithread.h>
00063 #include "ToolList.hh"
00064 #include "LogTool.hh"
00065 
00066 class SendThread: public omni_thread {
00067 public:
00074   explicit SendThread(ToolList* toolList);
00075 
00079   void
00080   startThread();
00081 
00087   void
00088   stopThread();
00089 
00090 protected:
00096   void*
00097   run_undetached(void* arg);
00098 
00105   ~SendThread();
00106 
00107 private:
00113   bool runSendThread;
00114 
00118   ToolList* toolList;
00119 };
00120 
00121 #endif