~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to src/accountcache.h

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2014-03-24 15:52:37 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140324155237-3kod0m3wr2a2ag39
Tags: 1.0.1-0ubuntu1
* New upstream release (LP: #1294936).
* Modify display mode of weather forecast and system settings.
* Add file manager and font style settings.
* Improve system settings and restoring default settings.
* Cache user account (not password).
* Change the position of window control buttons.
* Add configuration for Kingsoft KuaiPan cloud client.
* Add the instruction of Youker Assistant.
* Open related folders when scanning items got double-clicked.
* Notify users when operating the Kingsoft disk cloud configuration.
* Modify Dbus starting method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 ~ 2014 National University of Defense Technology(NUDT) & Kylin Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#ifndef ACCOUNTCACHE_H
 
18
#define ACCOUNTCACHE_H
 
19
 
 
20
#include <QStringList>
 
21
#include <QDomElement>
 
22
#include <QDir>
 
23
#include <QFile>
 
24
#include <QDesktopServices>
 
25
#include <QTextStream>
 
26
#include <qmath.h>
 
27
 
 
28
class AccountCache
 
29
{
 
30
public:
 
31
    AccountCache();
 
32
    QString getPassword(const QString& bareJid);
 
33
    void addAccount(const QString& bareJid, const QString& passwd);
 
34
    void loadFromFile();
 
35
    QStringList getUserName();
 
36
private:
 
37
    void saveToFile();
 
38
    QDomDocument accountsDocument;
 
39
    QString dir ;
 
40
    QByteArray calculateXor(const QByteArray &data, const QByteArray &key);
 
41
};
 
42
 
 
43
#endif // ACCOUNTCACHE_H