~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kresources/slox/sloxaccounts.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    This file is part of kdepim.
3
 
 
4
 
    Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
5
 
 
6
 
    This program is free software; you can redistribute it and/or modify
7
 
    it under the terms of the GNU General Public License as published by
8
 
    the Free Software Foundation; either version 2 of the License, or
9
 
    (at your option) any later version.
10
 
 
11
 
    This program 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
14
 
    GNU General Public License for more details.
15
 
 
16
 
    You should have received a copy of the GNU General Public License
17
 
    along with this program; if not, write to the Free Software
18
 
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
 
*/
20
 
#ifndef SLOXACCOUNTS_H
21
 
#define SLOXACCOUNTS_H
22
 
 
23
 
#include <kabc/addressee.h>
24
 
#include <QObject>
25
 
#include "slox_export.h"
26
 
 
27
 
class KJob;
28
 
namespace KIO {
29
 
class Job;
30
 
}
31
 
 
32
 
class SloxBase;
33
 
 
34
 
class KSLOX_EXPORT SloxAccounts : public QObject
35
 
{
36
 
    Q_OBJECT
37
 
  public:
38
 
    SloxAccounts( SloxBase *res, const KUrl &baseUrl );
39
 
    ~SloxAccounts();
40
 
 
41
 
    void insertUser( const QString &id, const KABC::Addressee &a );
42
 
 
43
 
    KABC::Addressee lookupUser( const QString &id );
44
 
 
45
 
    QString lookupId( const QString &email );
46
 
 
47
 
  protected:
48
 
    void requestAccounts();
49
 
    void readAccounts();
50
 
 
51
 
    QString cacheFile() const;
52
 
 
53
 
  protected slots:
54
 
    void slotResult( KJob * );
55
 
 
56
 
  private:
57
 
    QString mDomain;
58
 
 
59
 
    KIO::Job *mDownloadJob;
60
 
 
61
 
    QMap<QString, KABC::Addressee> mUsers; // map users ids to addressees.
62
 
 
63
 
    KUrl mBaseUrl;
64
 
    SloxBase *mRes;
65
 
};
66
 
 
67
 
#endif