]> git.saurik.com Git - wxWidgets.git/blame - include/wx/sckstrm.h
Replace wxComboBox::IsEmpty() with Is{List,Text}Empty().
[wxWidgets.git] / include / wx / sckstrm.h
CommitLineData
f4ada568 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/sckstrm.h
f4ada568
GL
3// Purpose: wxSocket*Stream
4// Author: Guilhem Lavaux
5// Modified by:
6// Created: 17/07/97
7// RCS-ID: $Id$
8// Copyright: (c)
65571936 9// Licence: wxWindows licence
f4ada568
GL
10/////////////////////////////////////////////////////////////////////////////
11#ifndef __SCK_STREAM_H__
12#define __SCK_STREAM_H__
13
f4ada568 14#include "wx/stream.h"
ce4169a4
RR
15
16#if wxUSE_SOCKETS && wxUSE_STREAMS
17
f4ada568
GL
18#include "wx/socket.h"
19
7c4728f6 20class WXDLLIMPEXP_NET wxSocketOutputStream : public wxOutputStream
f4ada568 21{
a9a2485d
FM
22public:
23 wxSocketOutputStream(wxSocketBase& s);
24 virtual ~wxSocketOutputStream();
f4ada568 25
a9a2485d
FM
26protected:
27 wxSocketBase *m_o_socket;
f4ada568 28
a9a2485d 29 size_t OnSysWrite(const void *buffer, size_t bufsize);
375abe3d 30
a9a2485d 31 // socket streams are both un-seekable and size-less streams:
03647350 32 wxFileOffset OnSysTell() const
a9a2485d 33 { return wxInvalidOffset; }
03647350 34 wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode))
a9a2485d 35 { return wxInvalidOffset; }
22f3361e 36
c0c133e1 37 wxDECLARE_NO_COPY_CLASS(wxSocketOutputStream);
f4ada568
GL
38};
39
7c4728f6 40class WXDLLIMPEXP_NET wxSocketInputStream : public wxInputStream
f4ada568 41{
a9a2485d
FM
42public:
43 wxSocketInputStream(wxSocketBase& s);
44 virtual ~wxSocketInputStream();
f4ada568 45
a9a2485d
FM
46protected:
47 wxSocketBase *m_i_socket;
f4ada568 48
a9a2485d 49 size_t OnSysRead(void *buffer, size_t bufsize);
375abe3d 50
a9a2485d
FM
51 // socket streams are both un-seekable and size-less streams:
52
03647350 53 wxFileOffset OnSysTell() const
a9a2485d 54 { return wxInvalidOffset; }
03647350 55 wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode))
a9a2485d 56 { return wxInvalidOffset; }
22f3361e 57
c0c133e1 58 wxDECLARE_NO_COPY_CLASS(wxSocketInputStream);
f4ada568
GL
59};
60
7c4728f6 61class WXDLLIMPEXP_NET wxSocketStream : public wxSocketInputStream,
1777b9bb 62 public wxSocketOutputStream
75ed1d15 63{
a9a2485d
FM
64public:
65 wxSocketStream(wxSocketBase& s);
66 virtual ~wxSocketStream();
fc7a2a60 67
a9a2485d 68 wxDECLARE_NO_COPY_CLASS(wxSocketStream);
f4ada568
GL
69};
70
71#endif
ce4169a4
RR
72 // wxUSE_SOCKETS && wxUSE_STREAMS
73
74#endif
a324a7bc 75 // __SCK_STREAM_H__