summaryrefslogtreecommitdiffstats
path: root/kshutdown/kshutdowniface.h
blob: 2a72c75120ef0a9cf8b1d4005fe62101cfacdfbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
	kshutdowniface.h - KShutdown DCOP interface
	Copyright (C) 2003  Konrad Twardowski <kdtonline@poczta.onet.pl>

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef __KSHUTDOWNIFACE_H__
#define __KSHUTDOWNIFACE_H__

#include <dcopobject.h>

/**
 * @short KShutDown DCOP interface (KShutdownIface).
 * See the KShutDown Handbook (F1) for details.
 */
class KShutdownIface: virtual public DCOPObject
{
	K_DCOP
public:
k_dcop:

	// general actions

	/**
	 * Cancels the current action.
	 */
	virtual ASYNC cancel() = 0;

	/**
	 * Executes the <b>Shut Down</b> action.
	 */
	virtual bool shutDown() = 0;

	/**
	 * @see shutDown
	 */
	virtual bool shutdown() = 0;

	/**
	 * Executes the @b Reboot" action.
	 */
	virtual bool reboot() = 0;

	/**
	 * Executes the <b>Lock Screen</b> action.
	 */
	virtual bool lockScreen() = 0;

	/**
	 * Executes the @b Logout action.
	 */
	virtual bool logout() = 0;

	// misc. functions

	/**
	 * Shows the settings dialog.
	 */
	virtual ASYNC configure() = 0;

	/**
	 * Returns a KShutDown status information as text
	 * (e.g. "Idle", "Busy", "1 minute warning", etc).
	 * Can be used in Karamba themes, for example.
	 */
	virtual QString getStatusInfo() = 0;

	/**
	 * Hides the main window and its system tray icon.
	 */
	virtual void makeInvisible() = 0;

	/**
	 * Shows and raises the main window.
	 * The window will be visible on the current desktop.
	 */
	virtual ASYNC makeVisible() = 0;

	/**
	 * Sets test mode to @p yes.
	 */
	virtual ASYNC setTestMode(bool yes) = 0;
};

#endif // __KSHUTDOWNIFACE_H__