~ubuntu-branches/ubuntu/trusty/knemo/trusty

« back to all changes in this revision

Viewing changes to src/knemod/backends/backendbase.h

  • Committer: Bazaar Package Importer
  • Author(s): Debian KDE Extras Team, Achim Bohnet
  • Date: 2006-08-22 17:11:42 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060822171142-wmuezmfcu74crfla
Tags: 0.4.4-2
[ Achim Bohnet ]
control: remove Depends: kdelibs-bin.  kdelibs-bin was merged into
kdelibs4c2a (4:3.5.3-1). kdelibs4c2a is added via ${shlibs:Depends}.
Thx Hobbsee for reminding me (again and again :).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of KNemo
 
2
   Copyright (C) 2006 Percy Leonhardt <percy@eris23.de>
 
3
 
 
4
   KNemo is free software; you can redistribute it and/or modify
 
5
   it under the terms of the GNU Library General Public License as
 
6
   published by the Free Software Foundation; either version 2 of
 
7
   the License, or (at your option) any later version.
 
8
 
 
9
   KNemo is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
   GNU Library General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Library General Public License
 
15
   along with this library; see the file COPYING.LIB.  If not, write to
 
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
   Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef BACKENDBASE_H
 
21
#define BACKENDBASE_H
 
22
 
 
23
#include <qdict.h>
 
24
#include <qstring.h>
 
25
 
 
26
#include <klocale.h>
 
27
 
 
28
#include "data.h"
 
29
#include "interface.h"
 
30
 
 
31
/**
 
32
 * This is the baseclass for all backends. Every backend that
 
33
 * should be used for KNemo must inherit from this class.
 
34
 *
 
35
 * @short Baseclass for all backends
 
36
 * @author Percy Leonhardt <percy@eris23.de>
 
37
 */
 
38
 
 
39
class BackendBase
 
40
{
 
41
public:
 
42
    BackendBase( QDict<Interface>& interfaces );
 
43
    virtual ~BackendBase();
 
44
 
 
45
    /**
 
46
     * Create an instance of this backend because KNemo
 
47
     * does not know about the different types of backends.
 
48
     */
 
49
 
 
50
    /**
 
51
     * This function is called from KNemo whenever the
 
52
     * backend shall update the information of the
 
53
     * interfaces in the QDict.
 
54
     */
 
55
    virtual void update() = 0;
 
56
 
 
57
protected:
 
58
    /**
 
59
     * Call this function when you have completed the
 
60
     * update. It will trigger the interfaces to check
 
61
     * if there state has changed.
 
62
     */
 
63
    void updateComplete();
 
64
 
 
65
    const QDict<Interface>& mInterfaces;
 
66
};
 
67
 
 
68
#endif // BACKENDBASE_H