2
* Copyright (C) 2010 Canonical, Ltd.
5
* Olivier Tilloy <olivier.tilloy@canonical.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 3.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef LAUNCHERDEVICE_H
21
#define LAUNCHERDEVICE_H
25
#include "launcheritem.h"
31
class LauncherDevice : public LauncherItem
37
LauncherDevice(const LauncherDevice& other);
41
virtual bool active() const;
42
virtual bool running() const;
43
virtual int windowCount() const;
44
virtual bool urgent() const;
45
virtual QString name() const;
46
virtual QString icon() const;
47
virtual bool launching() const;
50
Q_INVOKABLE virtual void activate();
51
Q_INVOKABLE GVolume* getVolume();
52
Q_INVOKABLE void setVolume(GVolume* volume);
53
Q_INVOKABLE void open();
54
Q_INVOKABLE void unmount(GMountOperation* mountOperation);
55
Q_INVOKABLE void eject();
56
Q_INVOKABLE void stop();
58
Q_INVOKABLE virtual void createMenuActions();
61
void onEjectTriggered();
62
void onStopTriggered();
67
static void onVolumeMounted(GVolume* volume, GAsyncResult* res);
68
static void onVolumeEjected(GVolume* volume, GAsyncResult* res);
69
static void onDriveStopped(GDrive* drive, GAsyncResult* res);
70
static void onMountUnmounted(GMount* mount, GAsyncResult* res);
73
Q_DECLARE_METATYPE(LauncherDevice*)
75
#endif // LAUNCHERDEVICE_H