1
/**vim: ts=4, wrap, tw=80
3
* --- libkvibiffsocket.h---
6
* Szymon Stefanek <stefanek@tin.it>
7
* Krzysztof Godlewski <kristoff@poczta.wprost.pl>
9
* This program is FREE software. You can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* as published by the Free Software Foundation; either version 2
12
* of the License, or (at your opinion) any later version.
14
* This program is distributed in the HOPE that it will be USEFUL,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
* See the GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, write to the Free Software Foundation,
21
* Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
#ifndef _LIBKVIBIFFSOCKET_H_
26
#define _LIBKVIBIFFSOCKET_H_
28
#include <qsocketnotifier.h>
30
#include "kvi_string.h"
36
class KviBiffSocket : public QObject
46
QSocketNotifier * m_pNotifier;
49
KviBiffMailbox * m_pMailbox;
51
unsigned short int m_uPort;
58
const char * hostname() const { return m_szHostname.ptr(); };
59
const char * hostIp() const { return m_szHostIp.ptr(); };
60
unsigned short int port() const { return m_uPort; };
61
bool run(KviBiffMailbox * box);
64
void dnsDone(KviDnsStruct *dns);
65
void writeNotifierFired(int fd);
66
void readNotifierFired(int fd);
70
void connected(); // emitted to signal the connection estabilished
72
// The following two signals are critical:
73
// Can't rely on the this pointer after these have been emitted
74
void error(const char * err); // emitted in case of critical errors
75
void jobDone(); // emitted when the update job has been terminated