~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
 *   Copyright (C) 2014 by Savoir-Faire Linux                               *
 
3
 *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
 
4
 *                                                                          *
 
5
 *   This library is free software; you can redistribute it and/or          *
 
6
 *   modify it under the terms of the GNU Lesser General Public             *
 
7
 *   License as published by the Free Software Foundation; either           *
 
8
 *   version 2.1 of the License, or (at your option) any later version.     *
 
9
 *                                                                          *
 
10
 *   This library is distributed in the hope that it will be useful,        *
 
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
 
13
 *   Lesser General Public License for more details.                        *
 
14
 *                                                                          *
 
15
 *   You should have received a copy of the GNU General Public License      *
 
16
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
 
17
 ***************************************************************************/
 
18
#ifndef COMMONBACKENDMANAGERINTERFACE_H
 
19
#define COMMONBACKENDMANAGERINTERFACE_H
 
20
 
 
21
#include "typedefs.h"
 
22
 
 
23
class CommonItemBackendModel;
 
24
 
 
25
enum LoadOptions {
 
26
   NONE           = 0x0     ,
 
27
   FORCE_ENABLED  = 0x1 << 0,
 
28
   FORCE_DISABLED = 0x1 << 1,
 
29
};
 
30
 
 
31
template <class T> class LIB_EXPORT CommonBackendManagerInterface {
 
32
public:
 
33
   virtual ~CommonBackendManagerInterface() {};
 
34
 
 
35
 
 
36
 
 
37
   /// Add a new backend
 
38
   virtual void addBackend(T* backend, LoadOptions options = LoadOptions::NONE) = 0;
 
39
 
 
40
   /// Do this manager have active backends
 
41
   virtual bool hasEnabledBackends () const = 0;
 
42
   virtual bool hasBackends        () const = 0;
 
43
 
 
44
   /// List all backends
 
45
   virtual const QVector<T*> backends       () const = 0;
 
46
   virtual const QVector<T*> enabledBackends() const = 0;
 
47
 
 
48
   ///Enable / disable a backend
 
49
   virtual bool enableBackend(T* backend, bool enabled) = 0;
 
50
 
 
51
   /// Return a backend
 
52
   virtual CommonItemBackendModel* backendModel() const = 0;
 
53
};
 
54
 
 
55
#endif