home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / business / printcar / printcar.exe / src / IrDA / IrOutputStream.h < prev    next >
C/C++ Source or Header  |  2000-06-06  |  986b  |  50 lines

  1. //
  2. //  $Id: IrOutputStream.h,v 1.3 2000/06/06 09:30:56 sergey Exp $
  3. //
  4.  
  5. #ifndef _IrOutputStream_h_
  6. #define _IrOutputStream_h_
  7.  
  8. #include "Util/OutputStream.h"
  9. #include "IrPort.h"
  10.  
  11.  
  12. namespace IrDA
  13. {
  14.     //
  15.     //  IrOutputStream class implements OutputStream interface.
  16.     //  All data will be re-directed into the IR port.
  17.     //
  18.     class IrOutputStream: public Util::OutputStream
  19.     {
  20.     public:
  21.         IrOutputStream() {}
  22.  
  23.     private:
  24.         IrOutputStream(const IrOutputStream&);
  25.         IrOutputStream& operator =(const IrOutputStream&);
  26.  
  27.     // operations
  28.     public:
  29.         bool open();
  30.         bool open(Callback& callback);
  31.  
  32.         void close();
  33.  
  34.     // OutputStream interface
  35.  
  36.         virtual void writeData(const void* data, int size);
  37.  
  38.     // attributes
  39.  
  40.         bool isOpened() const { _port.isOpened(); }
  41.  
  42.     // data members
  43.     private:
  44.         Port _port;
  45.     };
  46. }
  47. // namespace IrDA
  48.  
  49. #endif // _IrOutputStream_h_
  50.