File indexing completed on 2024-05-19 04:50:17
0001 /**************************************************************************************** 0002 * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn@kde.org> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) version 3 or * 0007 * any later version accepted by the membership of KDE e.V. (or its successor approved * 0008 * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of * 0009 * version 3 of the license. * 0010 * * 0011 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0012 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0013 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License along with * 0016 * this program. If not, see <http://www.gnu.org/licenses/>. * 0017 ****************************************************************************************/ 0018 0019 #ifndef MAGNATUNECONFIG_H 0020 #define MAGNATUNECONFIG_H 0021 0022 #include <QString> 0023 0024 0025 /** 0026 Wrapper class for configuration options for the MagnatuneStore plugin 0027 0028 @author 0029 */ 0030 class MagnatuneConfig{ 0031 public: 0032 0033 enum 0034 { 0035 STREAM = 0, 0036 DOWNLOAD = 1 0037 }; 0038 0039 0040 MagnatuneConfig(); 0041 0042 ~MagnatuneConfig(); 0043 0044 void load(); 0045 void save(); 0046 0047 bool isMember(); 0048 void setIsMember( bool isMember ); 0049 0050 bool autoUpdateDatabase(); 0051 void setAutoUpdateDatabase( bool value ); 0052 0053 int membershipType(); 0054 void setMembershipType( int membershipType ); 0055 QString membershipPrefix(); 0056 0057 QString email() const; 0058 void setEmail( const QString &email ); 0059 0060 QString username() const; 0061 QString password() const; 0062 0063 void setUsername( const QString &username ); 0064 void setPassword( const QString &password ); 0065 0066 void setStreamType( int theValue ); 0067 int streamType() const; 0068 0069 qulonglong lastUpdateTimestamp() const; 0070 void setLastUpdateTimestamp( qulonglong timestamp ); 0071 0072 0073 private: 0074 0075 bool m_hasChanged; 0076 bool m_autoUpdate; 0077 QString m_username; 0078 QString m_password; 0079 int m_membershipType; 0080 bool m_isMember; 0081 int m_streamType; 0082 QString m_email; 0083 qulonglong m_lastUpdateTimestamp; 0084 0085 }; 0086 0087 #endif