]> git.saurik.com Git - wxWidgets.git/blob - include/wx/sckstrm.h
Make wxABI_VERSION default be e.g. 20699
[wxWidgets.git] / include / wx / sckstrm.h
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
15 #pragma interface
16 #endif
17
18 #include "wx/stream.h"
19
20 #if wxUSE_SOCKETS && wxUSE_STREAMS
21
22 #include "wx/socket.h"
23
24 class WXDLLIMPEXP_NET wxSocketOutputStream : public wxOutputStream
25 {
26 public:
27 wxSocketOutputStream(wxSocketBase& s);
28 ~wxSocketOutputStream();
29
30 wxFileOffset SeekO( wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
31 { return -1; }
32 wxFileOffset TellO() const
33 { return -1; }
34
35 protected:
36 wxSocketBase *m_o_socket;
37
38 size_t OnSysWrite(const void *buffer, size_t bufsize);
39
40 DECLARE_NO_COPY_CLASS(wxSocketOutputStream)
41 };
42
43 class WXDLLIMPEXP_NET wxSocketInputStream : public wxInputStream
44 {
45 public:
46 wxSocketInputStream(wxSocketBase& s);
47 ~wxSocketInputStream();
48
49 wxFileOffset SeekI( wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
50 { return -1; }
51 wxFileOffset TellI() const
52 { return -1; }
53
54 protected:
55 wxSocketBase *m_i_socket;
56
57 size_t OnSysRead(void *buffer, size_t bufsize);
58
59 DECLARE_NO_COPY_CLASS(wxSocketInputStream)
60 };
61
62 class WXDLLIMPEXP_NET wxSocketStream : public wxSocketInputStream,
63 public wxSocketOutputStream
64 {
65 public:
66 wxSocketStream(wxSocketBase& s);
67 ~wxSocketStream();
68
69 DECLARE_NO_COPY_CLASS(wxSocketStream)
70 };
71
72 #endif
73 // wxUSE_SOCKETS && wxUSE_STREAMS
74
75 #endif
76 // __SCK_STREAM_H__