/***************************************************************************
                            qt_QSocketDevice.h -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#ifndef QT_QSOCKETDEVICE
#define QT_QSOCKETDEVICE

#include <qtc/qtc_types.h>

#define QSOCKETDEVICE_Stream	0
#define QSOCKETDEVICE_Datagram	1
#define QSOCKETDEVICE_NoError	0
#define QSOCKETDEVICE_AlreadyBound	1
#define QSOCKETDEVICE_Inaccessible	2
#define QSOCKETDEVICE_NoResources	3
#define QSOCKETDEVICE_Bug	4
#define QSOCKETDEVICE_Impossible	5
#define QSOCKETDEVICE_NoFiles	6
#define QSOCKETDEVICE_ConnectionRefused	7
#define QSOCKETDEVICE_NetworkFailure	8
#define QSOCKETDEVICE_UnknownError	9
qt_QSocketDevice * qt_new_QSocketDevice(int type);
qt_QSocketDevice * qt_new_QSocketDevice1(int socket, int type);
void qt_del_QSocketDevice( qt_QSocketDevice* p );
int qt_QSocketDevice_isValid(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_type(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_socket(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_setSocket(qt_QSocketDevice* instPointer,int socket, int type);
int qt_QSocketDevice_open(qt_QSocketDevice* instPointer,int mode);
void qt_QSocketDevice_close(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_flush(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_size(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_at(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_at1(qt_QSocketDevice* instPointer,int arg1);
int qt_QSocketDevice_atEnd(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_blocking(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_setBlocking(qt_QSocketDevice* instPointer,int arg1);
int qt_QSocketDevice_addressReusable(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_setAddressReusable(qt_QSocketDevice* instPointer,int arg1);
int qt_QSocketDevice_receiveBufferSize(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_setReceiveBufferSize(qt_QSocketDevice* instPointer,unsigned int arg1);
int qt_QSocketDevice_sendBufferSize(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_setSendBufferSize(qt_QSocketDevice* instPointer,unsigned int arg1);
int qt_QSocketDevice_connect(qt_QSocketDevice* instPointer,qt_QHostAddress* arg1, unsigned short arg2);
int qt_QSocketDevice_bind(qt_QSocketDevice* instPointer,qt_QHostAddress* arg1, unsigned short arg2);
int qt_QSocketDevice_listen(qt_QSocketDevice* instPointer,int backlog);
int qt_QSocketDevice_accept(qt_QSocketDevice* instPointer);
long qt_QSocketDevice_bytesAvailable(qt_QSocketDevice* instPointer);
long qt_QSocketDevice_waitForMore(qt_QSocketDevice* instPointer,int msecs, int* timeout);
long qt_QSocketDevice_readBlock(qt_QSocketDevice* instPointer,char* data, long maxlen);
long qt_QSocketDevice_writeBlock(qt_QSocketDevice* instPointer,char* data, long len);
long qt_QSocketDevice_writeBlock1(qt_QSocketDevice* instPointer,char* data, long len, qt_QHostAddress* host, unsigned short port);
int qt_QSocketDevice_getch(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_putch(qt_QSocketDevice* instPointer,int arg1);
int qt_QSocketDevice_ungetch(qt_QSocketDevice* instPointer,int arg1);
unsigned short qt_QSocketDevice_port(qt_QSocketDevice* instPointer);
unsigned short qt_QSocketDevice_peerPort(qt_QSocketDevice* instPointer);
qt_QHostAddress* qt_QSocketDevice_address(qt_QSocketDevice* instPointer);
qt_QHostAddress* qt_QSocketDevice_peerAddress(qt_QSocketDevice* instPointer);
int qt_QSocketDevice_error(qt_QSocketDevice* instPointer);
void qt_QSocketDevice_setError(qt_QSocketDevice* instPointer,int err);

#endif
