1 /****************************************************************************************
2  * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn@kde.org>                                *
3  *                                                                                      *
4  * This program is free software; you can redistribute it and/or modify it under        *
5  * the terms of the GNU General Public License as published by the Free Software        *
6  * Foundation; either version 2 of the License, or (at your option) version 3 or        *
7  * any later version accepted by the membership of KDE e.V. (or its successor approved  *
8  * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of  *
9  * version 3 of the license.                                                            *
10  *                                                                                      *
11  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
13  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
14  *                                                                                      *
15  * You should have received a copy of the GNU General Public License along with         *
16  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
17  ****************************************************************************************/
18 
19 #ifndef MAGNATUNECONFIG_H
20 #define MAGNATUNECONFIG_H
21 
22 #include <QString>
23 
24 
25 /**
26 Wrapper class for configuration options for the MagnatuneStore plugin
27 
28 	@author
29 */
30 class MagnatuneConfig{
31 public:
32 
33     enum
34     {
35         STREAM = 0,
36         DOWNLOAD = 1
37     };
38 
39 
40     MagnatuneConfig();
41 
42     ~MagnatuneConfig();
43 
44     void load();
45     void save();
46 
47     bool isMember();
48     void setIsMember( bool isMember );
49 
50     bool autoUpdateDatabase();
51     void setAutoUpdateDatabase( bool value );
52 
53     int membershipType();
54     void setMembershipType( int membershipType );
55     QString membershipPrefix();
56 
57     QString email() const;
58     void setEmail( const QString &email );
59 
60     QString username() const;
61     QString password() const;
62 
63     void setUsername( const QString &username );
64     void setPassword( const QString &password );
65 
66     void setStreamType( int theValue );
67     int streamType() const;
68 
69     qulonglong lastUpdateTimestamp() const;
70     void setLastUpdateTimestamp( qulonglong timestamp );
71 
72 
73 private:
74 
75     bool m_hasChanged;
76     bool m_autoUpdate;
77     QString m_username;
78     QString m_password;
79     int m_membershipType;
80     bool m_isMember;
81     int m_streamType;
82     QString m_email;
83     qulonglong m_lastUpdateTimestamp;
84 
85 };
86 
87 #endif
88