~ubuntu-branches/ubuntu/hoary/kvirc/hoary

« back to all changes in this revision

Viewing changes to src/plugins/biff/libkvibiffsocket.h

  • Committer: Bazaar Package Importer
  • Author(s): Robin Verduijn
  • Date: 2004-12-14 15:32:19 UTC
  • mfrom: (0.2.1 upstream) (1.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041214153219-fdink3gyp2s20b6g
Tags: 2:2.1.3.1-2
* Change Recommends on xmms to a Suggests.
* Rebuild against KDE 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**vim: ts=4, wrap, tw=80
2
 
  *
3
 
  *             --- libkvibiffsocket.h---
4
 
  *
5
 
  * Authors:
6
 
  *     Szymon Stefanek <stefanek@tin.it>
7
 
  *     Krzysztof Godlewski <kristoff@poczta.wprost.pl>
8
 
  * 
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.
13
 
  *
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.
18
 
 
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.
22
 
  **/
23
 
 
24
 
 
25
 
#ifndef _LIBKVIBIFFSOCKET_H_
26
 
#define _LIBKVIBIFFSOCKET_H_
27
 
 
28
 
#include <qsocketnotifier.h>
29
 
 
30
 
#include "kvi_string.h"
31
 
#include "kvi_dns.h"
32
 
 
33
 
class KviBiffWidget;
34
 
class KviBiffMailbox;
35
 
 
36
 
class KviBiffSocket : public QObject
37
 
{
38
 
        Q_OBJECT
39
 
 
40
 
public:
41
 
        KviBiffSocket();
42
 
        ~KviBiffSocket();
43
 
        
44
 
protected:
45
 
        int                m_fd;
46
 
        QSocketNotifier  * m_pNotifier;
47
 
        KviStr             m_szHostIp;
48
 
        KviAsyncDns      * m_pDns;
49
 
        KviBiffMailbox   * m_pMailbox;
50
 
        // Original data
51
 
        unsigned short int m_uPort;
52
 
        KviStr             m_szUsername;
53
 
        KviStr             m_szPassword;
54
 
        KviStr             m_szHostname;
55
 
        KviStr             m_lastCommand;
56
 
        
57
 
public:
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);
62
 
        
63
 
protected slots:
64
 
        void dnsDone(KviDnsStruct *dns);
65
 
        void writeNotifierFired(int fd);
66
 
        void readNotifierFired(int fd);
67
 
        
68
 
signals:
69
 
        void resolving();
70
 
        void connected();               // emitted to signal the connection estabilished
71
 
        void loggedIn();
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
76
 
};
77
 
 
78
 
#endif