Build, if that was not necessary blame cartman who told me "sure" :-D
[kdepim.git] / libkdepim / kaccount.h
blobb7efca9f05182a5ac1dac810cca4941681fe1d29
1 /* -*- c++ -*-
2 kaccount.h
4 This file is part of KMail, the KDE mail client.
5 Copyright (C) 2002 Carsten Burghardt <burghardt@kde.org>
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
32 #ifndef __KACCOUNT
33 #define __KACCOUNT
35 #include <qstring.h>
37 class KConfig;
39 class KAccount
41 public:
42 /** Type information */
43 enum Type {
44 Imap,
45 MBox,
46 Maildir,
47 News,
48 DImap,
49 Other
52 KAccount( const uint id = 0, const QString &name = QString::null,
53 const Type type = Other );
55 /**
56 * Get/Set name
57 */
58 QString name() const { return mName; }
59 void setName( const QString& name ) { mName = name; }
61 /**
62 * Get/Set id
63 */
64 uint id() const { return mId; }
65 void setId( const uint id ) { mId = id; }
67 /**
68 * Get/Set type
69 */
70 Type type() const { return mType; }
71 void setType( const Type type ) { mType = type; }
73 /**
74 * Save the settings
75 * If the group is empty it must be preset in the KConfig
77 void writeConfig( KConfig &config, const QString &group = QString::null );
79 /**
80 * Read the settings
81 * If the group is empty it must be preset in the KConfig
83 void readConfig( KConfig &config, const QString &group = QString::null );
85 protected:
86 uint mId;
87 QString mName;
88 Type mType;
91 #endif