~ubuntu-branches/ubuntu/natty/kdebase-runtime/natty-proposed

« back to all changes in this revision

Viewing changes to activitymanager/EventProcessor.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-24 11:07:10 UTC
  • mto: (0.8.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 129.
  • Revision ID: james.westby@ubuntu.com-20101124110710-6dbsyw0yh21qvn82
Tags: upstream-4.5.80
ImportĀ upstreamĀ versionĀ 4.5.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
 
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 version 2,
 
6
 *   or (at your option) any later version, as published by the Free
 
7
 *   Software Foundation
 
8
 *
 
9
 *   This program 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 General Public License for more details
 
13
 *
 
14
 *   You should have received a copy of the GNU General Public
 
15
 *   License along with this program; if not, write to the
 
16
 *   Free Software Foundation, Inc.,
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
#ifndef EVENT_PROCESSOR_H
 
21
#define EVENT_PROCESSOR_H
 
22
 
 
23
#include <QThread>
 
24
 
 
25
class EventProcessorPrivate;
 
26
 
 
27
/**
 
28
 * Thread to process desktop/usage events
 
29
 */
 
30
class EventProcessor: public QThread {
 
31
public:
 
32
    static EventProcessor * self();
 
33
 
 
34
    virtual ~EventProcessor();
 
35
 
 
36
    enum EventType {
 
37
        Accessed,
 
38
        Opened,
 
39
        Modified,
 
40
        Closed
 
41
    };
 
42
 
 
43
    static void addEvent(const QString & application, const QString & uri, EventType type);
 
44
 
 
45
protected:
 
46
    void _event(const QString & application, const QString & uri, EventType type);
 
47
 
 
48
private:
 
49
    EventProcessor();
 
50
 
 
51
    class EventProcessorPrivate * const d;
 
52
};
 
53
 
 
54
#endif // EVENT_PROCESSOR_H