Statistics
| Branch: | Tag: | Revision:

root / kadu-core / protocols / protocol-factory.h @ d8068106

History | View | Annotate | Download (2.3 kB)

1
/*
2
 * %kadu copyright begin%
3
 * Copyright 2009 Juzef (juzefwt@tlen.pl)
4
 * Copyright 2008, 2009, 2010 Rafał Malinowski (rafal.przemyslaw.malinowski@gmail.com)
5
 * Copyright 2009 Bartłomiej Zimoń (uzi18@go2.pl)
6
 * Copyright 2009 Piotr Galiszewski (piotrgaliszewski@gmail.com)
7
 * %kadu copyright end%
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 as
11
 * published by the Free Software Foundation; either version 2 of
12
 * the License, or (at your option) 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. See the
17
 * 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, see <http://www.gnu.org/licenses/>.
21
 */
22
23
#ifndef PROTOCOL_FACTORY_H
24
#define PROTOCOL_FACTORY_H
25
26
#include <QtCore/QString>
27
#include <QtGui/QDialog>
28
29
#include "contacts/contact-details.h"
30
31
class Account;
32
class AccountCreateWidget;
33
class AccountDetails;
34
class AccountAddWidget;
35
class AccountEditWidget;
36
class AccountShared;
37
class Buddy;
38
class ConfigurationWindow;
39
class Contact;
40
class ContactShared;
41
class ContactWidget;
42
class Protocol;
43
class ProtocolMenuManager;
44
class StatusType;
45
class StoragePoint;
46
47
class ProtocolFactory : public QObject
48
{
49
public:
50
        virtual Protocol * createProtocolHandler(Account account) = 0;
51
        virtual AccountDetails * createAccountDetails(AccountShared *accountShared) = 0;
52
        virtual ContactDetails * createContactDetails(ContactShared *contactShared) = 0;
53
        virtual AccountAddWidget * newAddAccountWidget(QWidget *parent = 0) = 0;
54
        virtual AccountCreateWidget * newCreateAccountWidget(QWidget *parent = 0) = 0;
55
        virtual AccountEditWidget * newEditAccountWidget(Account, QWidget *parent = 0) = 0;
56
        virtual ContactWidget * newContactWidget(Contact contact, QWidget *parent = 0) = 0;
57
        virtual ProtocolMenuManager * protocolMenuManager() { return 0; }
58
        virtual QList<StatusType *> supportedStatusTypes() = 0;
59
        virtual QString idLabel() = 0;
60
        virtual QRegExp idRegularExpression() = 0;
61
62
        virtual QString name() = 0;
63
        virtual QString displayName() = 0;
64
65
        virtual QString iconName()
66
        {
67
                return QString::null;
68
        }
69
70
};
71
72
#endif // PROTOCOL_FACTORY_H