2
stream.h - Kopete Groupwise Protocol
4
Copyright (c) 2004 Matt Rogers <matt.rogers@kdemail.net>
6
Based on code copyright (c) 2004 SuSE Linux AG <http://www.suse.com>
7
Based on Iris, Copyright (C) 2003 Justin Karneges <justin@affinix.com>
9
Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
11
*************************************************************************
13
* This library is free software; you can redistribute it and/or *
14
* modify it under the terms of the GNU Lesser General Public *
15
* License as published by the Free Software Foundation; either *
16
* version 2 of the License, or (at your option) any later version. *
18
*************************************************************************
23
#ifndef YAHOO_STREAM_H
24
#define YAHOO_STREAM_H
28
class Stream : public QObject
32
enum Error { ErrParse, ErrProtocol, ErrStream, ErrCustom = 10 };
40
/*# InvalidXml, // not required*/
46
Stream(QObject *parent=0);
49
virtual void close()=0;
50
virtual int errorCondition() const=0;
51
virtual QString errorText() const=0;
54
* Are there any messages waiting to be read
56
virtual bool transfersAvailable() const = 0; // adapt to messages
58
* Read a message received from the server
60
virtual Transfer* read() = 0;
63
* Send a message to the server
65
virtual void write( Transfer *request) = 0;
69
void connectionClosed();
70
void delayedCloseFinished();
72
// void stanzaWritten();