~ci-train-bot/thumbnailer/thumbnailer-ubuntu-yakkety-landing-072

« back to all changes in this revision

Viewing changes to src/service/inactivityhandler.h

  • Committer: CI Train Bot
  • Author(s): Michi Henning
  • Date: 2015-09-15 11:04:11 UTC
  • mfrom: (125.1.2 landing150915)
  • Revision ID: ci-train-bot@canonical.com-20150915110411-233xw0fljaq7p2o0
Landing changes on devel to trunk.
Approved by: James Henstridge

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#pragma once
20
20
 
21
 
#include "dbusinterface.h"
22
 
 
23
21
#include <QObject>
24
22
#include <QTimer>
25
23
 
 
24
#include <functional>
 
25
 
26
26
namespace unity
27
27
{
28
28
 
36
36
{
37
37
    Q_OBJECT
38
38
public:
39
 
    InactivityHandler(DBusInterface& iface);
 
39
    InactivityHandler(std::function<void()> timer_func);
 
40
    ~InactivityHandler();
 
41
 
 
42
    void request_started();
 
43
    void request_completed();
 
44
 
 
45
public Q_SLOTS:
 
46
    void timer_expired();
40
47
 
41
48
private:
 
49
    std::function<void()> timer_func_;
 
50
    int num_active_requests_;
42
51
    QTimer timer_;
43
52
};
44
53