1/*
2 This file is part of libkabc.
3 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KABC_PLUGIN_H
22#define KABC_PLUGIN_H
23
24#include "kabc_export.h"
25#include <QtCore/QString>
26
27namespace KABC {
28
29/**
30 * Base class for Plugins. Defines the interface for the basic
31 * plugin properties.
32 *
33 * @see FormatInfo
34 */
35class KABC_EXPORT Plugin
36{
37 public:
38 /**
39 * Creates the Plugin instance.
40 */
41 Plugin();
42
43 /**
44 * Destroys the plugin instance
45 */
46 virtual ~Plugin();
47
48 /**
49 * Sets the plugin's type.
50 *
51 * @param type The type of the plugin
52 */
53 virtual void setType( const QString &type );
54
55 /**
56 * Returns the plugin's type.
57 */
58 virtual QString type() const;
59
60 /**
61 * Sets the plugin's name.
62 *
63 * @param label The localized string to display as the name
64 */
65 virtual void setNameLabel( const QString &label );
66
67 /**
68 * Returns the plugin's name.
69 */
70 virtual QString nameLabel() const;
71
72 /**
73 * Sets the plugin's description.
74 *
75 * @param label The localized string to display as a description
76 */
77 virtual void setDescriptionLabel( const QString &label );
78
79 /**
80 * Returns the plugin's description.
81 */
82 virtual QString descriptionLabel() const;
83
84 private:
85 class Private;
86 Private *const d;
87
88 Q_DISABLE_COPY( Plugin )
89};
90
91}
92#endif
93