~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to src/accountregdlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * accountregdlg.h
 
3
 * Copyright (C) 2001, 2002, 2006  Justin Karneges, Remko Troncon
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License
 
7
 * as published by the Free Software Foundation; either version 2
 
8
 * of the License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this library; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef ACCOUNTREGDLG_H
 
22
#define ACCOUNTREGDLG_H
 
23
 
 
24
#include <QDialog>
 
25
#include <QString>
 
26
 
 
27
#include "profiles.h"
 
28
#include "xmpp_jid.h"
 
29
#include "ui_accountreg.h"
 
30
 
 
31
class ProxyManager;
 
32
class ProxyChooser;
 
33
class QWidget;
 
34
class QScrollArea;
 
35
class QStringList;
 
36
class MiniClient;
 
37
class XDataWidget;
 
38
class ServerListQuerier;
 
39
namespace XMPP {
 
40
        class Form;
 
41
        class XData;
 
42
}
 
43
 
 
44
class AccountRegDlg : public QDialog
 
45
{
 
46
        Q_OBJECT
 
47
public:
 
48
        AccountRegDlg(ProxyManager*, QWidget *parent=0);
 
49
        ~AccountRegDlg();
 
50
 
 
51
        const XMPP::Jid& jid() const { return jid_; }
 
52
        const QString& pass() const { return pass_; }
 
53
        bool useHost() const { return opt_host_; }
 
54
        const QString& host() const { return host_; }
 
55
        int port() const { return port_; }
 
56
        bool legacySSLProbe() { return legacy_ssl_probe_; }
 
57
        UserAccount::SSLFlag ssl() const { return ssl_; }
 
58
        int proxy() const { return proxy_; }
 
59
 
 
60
public slots:
 
61
        void done(int);
 
62
 
 
63
protected:
 
64
        static XMPP::XData convertToXData(const XMPP::Form&);
 
65
        static XMPP::Form convertFromXData(const XMPP::XData&);
 
66
 
 
67
        bool checkSSL();
 
68
        void block();
 
69
        void unblock();
 
70
 
 
71
protected slots:
 
72
        void hostToggled(bool);
 
73
        void sslActivated(int);
 
74
        void next();
 
75
        
 
76
        void selectServer();
 
77
        void serverListReceived(const QStringList&);
 
78
        void serverListError(const QString&);
 
79
 
 
80
        void client_handshaken();
 
81
        void client_error();
 
82
 
 
83
        void getFields_finished();
 
84
        void setFields_finished();
 
85
 
 
86
private:
 
87
        Ui::AccountReg ui_;
 
88
        QScrollArea* fields_container_;
 
89
        XDataWidget* fields_;
 
90
        ProxyManager *proxy_manager_;
 
91
        ProxyChooser *proxy_chooser_;
 
92
        ServerListQuerier *serverlist_querier_;
 
93
        MiniClient *client_;
 
94
        bool isOld_;
 
95
 
 
96
        // Account settings
 
97
        XMPP::Jid jid_, server_;
 
98
        UserAccount::SSLFlag ssl_;
 
99
        bool opt_host_, legacy_ssl_probe_;
 
100
        QString host_;
 
101
        int port_;
 
102
        QString pass_;
 
103
        int proxy_;
 
104
};
 
105
 
 
106
#endif