]> git.saurik.com Git - wxWidgets.git/blame - include/wx/sckstrm.h
Readd mingw32 support
[wxWidgets.git] / include / wx / sckstrm.h
CommitLineData
f4ada568
GL
1/////////////////////////////////////////////////////////////////////////////
2// Name: sckstrm.h
3// Purpose: wxSocket*Stream
4// Author: Guilhem Lavaux
5// Modified by:
6// Created: 17/07/97
7// RCS-ID: $Id$
8// Copyright: (c)
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11#ifndef __SCK_STREAM_H__
12#define __SCK_STREAM_H__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/stream.h"
19#include "wx/socket.h"
20
75ed1d15 21class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream
f4ada568
GL
22{
23 public:
24 wxSocketOutputStream(wxSocketBase& s);
75ed1d15 25 ~wxSocketOutputStream();
f4ada568
GL
26
27 wxOutputStream& Write(const void *buffer, size_t size);
e22036dc
RR
28 off_t SeekO( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
29 { return -1; }
30 off_t TellO()
31 { return -1; }
f4ada568 32
f4ada568
GL
33 protected:
34 wxSocketBase *m_o_socket;
375abe3d
GL
35
36 size_t OnSysWrite(const void *buffer, size_t bufsize);
f4ada568
GL
37};
38
75ed1d15 39class WXDLLEXPORT wxSocketInputStream : public wxInputStream
f4ada568
GL
40{
41 public:
42 wxSocketInputStream(wxSocketBase& s);
43 ~wxSocketInputStream();
44
45 wxInputStream& Read(void *buffer, size_t size);
e22036dc
RR
46 off_t SeekI( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
47 { return -1; }
48 off_t TellI()
49 { return -1; }
f4ada568 50
f4ada568
GL
51 protected:
52 wxSocketBase *m_i_socket;
375abe3d
GL
53
54 size_t OnSysRead(void *buffer, size_t bufsize);
f4ada568
GL
55};
56
57class WXDLLEXPORT wxSocketStream : public wxSocketInputStream,
75ed1d15
GL
58 public wxSocketOutputStream
59{
f4ada568 60 public:
f4ada568 61 wxSocketStream(wxSocketBase& s);
75ed1d15 62 ~wxSocketStream();
f4ada568
GL
63};
64
65#endif