diff options
Diffstat (limited to 'apps/JAWS/server/IO.h')
-rw-r--r-- | apps/JAWS/server/IO.h | 67 |
1 files changed, 64 insertions, 3 deletions
diff --git a/apps/JAWS/server/IO.h b/apps/JAWS/server/IO.h index 95777d11a66..fd5ae0d64b2 100644 --- a/apps/JAWS/server/IO.h +++ b/apps/JAWS/server/IO.h @@ -18,9 +18,6 @@ #ifndef JAWS_IO_H #define JAWS_IO_H -class ACE_Message_Block; -class JAWS_IO_Handler; - #include "ace/ACE.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -29,6 +26,13 @@ class JAWS_IO_Handler; #include "ace/Asynch_IO.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +class ACE_Message_Block; +ACE_END_VERSIONED_NAMESPACE_DECL + +class JAWS_IO_Handler; + + class JAWS_IO // = TITLE // @@ -231,5 +235,62 @@ protected: }; #endif /* ACE_WIN32 */ + + +//-------------------Adding SYNCH IO no Caching + +class JAWS_Synch_IO_No_Cache : public JAWS_IO + // = TITLE + // + // This class defines the interface for a Synchronous I/O class, + // however in this class we do not use any caching. + // + // = DESCRIPTION + // + // Wondering how this is useful? + // The ACE_Filecache ACE_NOMAP option is broken and even if it were not, there + // are other use cases in which we want to avoid caching altogether. For example, + // we use JAWS in conjunction with the CIAO Repository Manager, however the two + // do not have any explicit knowledge of each other. Therefore if the RM tried + // to remove a package and its files from disk, its operation would [partially] + // fail if JAWS still holds some of the files in its cache. + // +{ +public: + JAWS_Synch_IO_No_Cache (void); + + ~JAWS_Synch_IO_No_Cache (void); + + virtual void handle (ACE_HANDLE h); + virtual ACE_HANDLE handle (void) const; + + void read (ACE_Message_Block& mb, int size); + + void transmit_file (const char *filename, + const char *header, + int header_size, + const char *trailer, + int trailer_size); + + void receive_file (const char *filename, + void *initial_data, + int initial_data_length, + int entire_length); + + void send_confirmation_message (const char *buffer, + int length); + + void send_error_message (const char *buffer, + int length); + +protected: + virtual void send_message (const char *buffer, + int length); + + ACE_HANDLE handle_; +}; + +//------------------- + #endif /* JAWS_IO_H */ |