~ubuntu-branches/ubuntu/precise/sflphone/precise

« back to all changes in this revision

Viewing changes to kde/src/lib/AccountList.h

  • Committer: Package Import Robot
  • Author(s): Whoopie
  • Date: 2012-03-22 10:29:10 UTC
  • mfrom: (4.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120322102910-tb8hugi2su1tguwh
Tags: 1.0.2-1ubuntu1
* Apply some upstream patches to fix FTBFS (LP: #913018):
  - debian/patches/05_glib_includes.patch: fix glib includes.
  - debian/patches/06_use_XkbKeycodeToKeysym.patch: use 
    XkbKeycodeToKeysym instead of (deprecated) XKeycodeToKeysym.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2009-2012 by Savoir-Faire Linux                         *
 
3
 *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>         *
 
4
 *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
 
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 3 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                         *
 
18
 *   Free Software Foundation, Inc.,                                       *
 
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 
20
 ***************************************************************************/
 
21
 
 
22
#ifndef ACCOUNT_LIST_H
 
23
#define ACCOUNT_LIST_H
 
24
 
 
25
 
 
26
#include <QtCore/QVector>
 
27
 
 
28
#include "Account.h"
 
29
#include "typedefs.h"
 
30
 
 
31
///@class AccountList List of all daemon accounts
 
32
class LIB_EXPORT AccountList : public QObject{
 
33
   Q_OBJECT
 
34
 
 
35
public:
 
36
 
 
37
   //Constructors & Destructors
 
38
   AccountList(QStringList & _accountIds);
 
39
   AccountList(bool fill = true);
 
40
   ~AccountList();
 
41
   
 
42
   //Getters
 
43
   const QVector<Account*>& getAccounts            (                        );
 
44
   QVector<Account*>        getAccountsByState     ( const QString& state   );
 
45
   QString                  getOrderedList         (                        ) const;
 
46
   Account*                 getAccountById         ( const QString& id      ) const;
 
47
   Account*                 getAccountAt           ( int i                  );
 
48
   const Account*           getAccountAt           ( int i                  ) const;
 
49
   int                      size                   (                        ) const;
 
50
   Account*                 firstRegisteredAccount (                        ) const;
 
51
   
 
52
   //Mutators
 
53
   virtual Account*  addAccount        ( QString & alias  )      ;
 
54
   void              removeAccount     ( Account* account )      ;
 
55
   QVector<Account*> registeredAccounts(                  ) const;
 
56
 
 
57
   //Operators
 
58
   Account*       operator[] (int i)      ;
 
59
   const Account* operator[] (int i) const;
 
60
   
 
61
private:
 
62
   //Attributes
 
63
   QVector<Account*>*  m_pAccounts;
 
64
   
 
65
public slots:
 
66
   void update();
 
67
   void updateAccounts();
 
68
   
 
69
signals:
 
70
   void accountListUpdated();
 
71
};
 
72
 
 
73
 
 
74
#endif