"Fossies" - the Fresh Open Source Software Archive

Member "ivtools-ivtools-2.0.4/src/AceDispatch/ace_iohandler.h" (9 Oct 2020, 2218 Bytes) of package /linux/misc/ivtools-ivtools-2.0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ace_iohandler.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 1996,1999 Vectaport Inc.
    3  *
    4  * Permission to use, copy, modify, distribute, and sell this software and
    5  * its documentation for any purpose is hereby granted without fee, provided
    6  * that the above copyright notice appear in all copies and that both that
    7  * copyright notice and this permission notice appear in supporting
    8  * documentation, and that the names of the copyright holders not be used in
    9  * advertising or publicity pertaining to distribution of the software
   10  * without specific, written prior permission.  The copyright holders make
   11  * no representations about the suitability of this software for any purpose.
   12  * It is provided "as is" without express or implied warranty.
   13  *
   14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
   15  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
   16  * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
   17  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
   18  * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
   19  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
   20  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   21  * 
   22  */
   23 
   24 #ifndef _ace_iohandler_h
   25 #define _ace_iohandler_h
   26 
   27 #ifdef HAVE_ACE
   28 
   29 #include <stdio.h>
   30 #include <signal.h>
   31 #include <ace/Event_Handler.h>
   32 #include <Dispatch/iohandler.h>
   33 
   34 // An ACE wrapper around InterViews IOHandler.  This makes possible
   35 // usage of InterViews IOHandlers with ACE_Dispatcher.
   36 
   37 class ACE_IO_Handler : public ACE_Event_Handler {
   38 public:
   39     ACE_IO_Handler(IOHandler*);
   40 
   41     IOHandler* iohandler() { return _iohandler; }
   42 
   43   virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
   44   // Called when input events occur (e.g., connection or data).
   45 
   46   virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE);
   47   // Called when output events are possible (e.g., flow control
   48   // abates).
   49 
   50   virtual int handle_exception (ACE_HANDLE fd = ACE_INVALID_HANDLE);
   51   // Called when execption events occur (e.g., SIGURG).
   52 
   53   virtual int handle_timeout (const ACE_Time_Value &tv, 
   54                   const void *arg = 0);
   55   // Called when timer expires.
   56 
   57 protected:
   58     IOHandler* _iohandler;
   59 };
   60 
   61 #endif
   62 
   63 #endif