~feng-kylin/youker-assistant/youker-assistant

« back to all changes in this revision

Viewing changes to src/monitordispatcher.h

  • Committer: kobe
  • Date: 2015-02-13 07:37:10 UTC
  • Revision ID: xiangli@ubuntukylin.com-20150213073710-0jyp02ilyi5njj10
Qt Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013 ~ 2014 National University of Defense Technology(NUDT) & Kylin Ltd.
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 as published by
6
 
 * the Free Software Foundation; version 3.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful,
9
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 * GNU General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 */
16
 
#ifndef MONITORDISPATCHER_H
17
 
#define MONITORDISPATCHER_H
18
 
 
19
 
#include <QObject>
20
 
#include <QtDBus>
21
 
#include <QDBusInterface>
22
 
#include <QDBusConnection>
23
 
 
24
 
class MonitorDispatcher : public QObject
25
 
{
26
 
    Q_OBJECT
27
 
public:
28
 
    explicit MonitorDispatcher(QObject *parent = 0);
29
 
    ~MonitorDispatcher();
30
 
    QDBusInterface *monitoriface;
31
 
    //退出sessiondubs服务
32
 
    Q_INVOKABLE void exit_qt();
33
 
    Q_INVOKABLE double get_cpu_percent_qt();
34
 
    Q_INVOKABLE QString get_total_memory_qt();
35
 
    Q_INVOKABLE QString get_used_memory_qt();
36
 
    Q_INVOKABLE QString get_free_memory_qt();
37
 
    Q_INVOKABLE QStringList get_network_flow_total_qt();
38
 
};
39
 
 
40
 
#endif // MONITORDISPATCHER_H