• Skip to content
  • Skip to link menu
  • KDE API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • KTp
wallet-interface.h
Go to the documentation of this file.
1 /*
2  * This file is part of telepathy-accounts-kcm
3  *
4  * Copyright (C) 2011 David Edmundson <kde@davidedmundson.co.uk>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef WALLETINTERFACE_H
22 #define WALLETINTERFACE_H
23 
24 #include <TelepathyQt/Account>
25 #include <TelepathyQt/PendingOperation>
26 
27 #include <KWallet/Wallet>
28 
29 #include <QScopedPointer>
30 
31 #include <KTp/ktp-export.h>
32 
33 namespace KTp
34 {
35 
36 class WalletInterfacePrivate;
37 class PendingWallet;
38 
39 
43 class KTP_EXPORT WalletInterface
44 {
45  friend class WalletInterfacePrivate;
46 public:
47 
49  static KTp::PendingWallet *openWallet();
50 
52  bool hasPassword(const Tp::AccountPtr &account);
53 
55  QString password(const Tp::AccountPtr &account);
56 
58  void setPassword(const Tp::AccountPtr &account, const QString &password);
59 
61  void setLastLoginFailed(const Tp::AccountPtr &account, bool failed);
62 
64  bool lastLoginFailed(const Tp::AccountPtr &account);
65 
67  void removePassword(const Tp::AccountPtr &account);
68 
70  bool hasEntry(const Tp::AccountPtr &account, const QString &key);
71 
73  QString entry(const Tp::AccountPtr &account, const QString &key);
74 
76  void setEntry(const Tp::AccountPtr &account, const QString &key, const QString &value);
77 
79  void removeEntry(const Tp::AccountPtr &account, const QString &key);
80 
82  void removeAllEntries(const Tp::AccountPtr &account);
83 
85  void removeAccount(const Tp::AccountPtr &account);
86 
88  bool isOpen();
89 
91  KWallet::Wallet* wallet() const;
92 
93 private:
94  Q_DISABLE_COPY(WalletInterface)
95  WalletInterface();
96  virtual ~WalletInterface();
97  WalletInterfacePrivate * const d;
98 };
99 
100 } // namespace KTp
101 
102 #endif // WALLETINTERFACE_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Mar 22 2013 10:58:52 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktp-common-internals API Reference

Skip menu "ktp-common-internals API Reference"
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal