qtkeychain/keychain.h

36 lines
648 B
C
Raw Normal View History

2011-10-27 16:14:37 +00:00
#ifndef KEYCHAIN_H
#define KEYCHAIN_H
#include <QString>
#include <stdexcept>
class KeychainException : public std::runtime_error {
public:
explicit KeychainException( const QString& message );
~KeychainException() throw();
QString message() const;
private:
QString m_message;
};
class Keychain {
public:
explicit Keychain( const QString& service );
~Keychain();
QString service() const;
void writePassword( const QString& account, const QString& password );
QString readPassword( const QString& account ) const;
private:
class Private;
Private* const d;
Q_DISABLE_COPY(Keychain)
};
#endif