Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Asynch_IO_Helpers.h
blob693250730c5a0d3fa43f721f62fe05e193768593
1 /* -*- c++ -*- */
2 #ifndef JAWS_ASYNCH_IO_HELPERS_H
3 #define JAWS_ASYNCH_IO_HELPERS_H
5 #include "ace/Asynch_IO.h"
6 #include "ace/Singleton.h"
8 #include "jaws3/Jaws_IO.h"
9 #include "jaws3/Event_Result.h"
10 #include "jaws3/Event_Completer.h"
12 class JAWS_Asynch_IO;
14 class JAWS_EC_AH_Adapter : public ACE_Handler
15 // = TITLE
16 // A JAWS_Event_Completer - ACE_Handler adapter.
18 // = DESCRIPTION
19 // This class will be conditionally #included by jaws3/Asynch_IO.cpp
20 // if the given platform supports POSIX or WIN32 asynch IO.
22 public:
23 static JAWS_EC_AH_Adapter * make (JAWS_Event_Completer *);
25 void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result);
27 void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result);
29 void handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result);
31 private:
32 JAWS_EC_AH_Adapter (JAWS_Event_Completer *completer)
33 : completer_ (completer)
37 protected:
38 JAWS_Event_Result make_io_result ( const ACE_Asynch_Result &result
39 , JAWS_Event_Result::JE_REASON reason_ok
40 , JAWS_Event_Result::JE_REASON reason_fail
43 private:
44 JAWS_Event_Completer *completer_;
47 #endif /* JAWS_ASYNCH_IO_HELPERS_H */