2
* Copyright 2013 Canonical Ltd.
4
* This file is part of powerd.
6
* powerd is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* powerd is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef __POWERD_CLI_H__
20
#define __POWERD_CLI_H__
24
#define do_test(test) \
27
printf("Test: " #test "\n"); \
29
printf(" result: %s\n", result ? "PASSED" : "FAILED"); \
33
extern gboolean silent_errors;
35
#define cli_warn(f, a...) do { if (!silent_errors) g_warning(f, ##a); } while (0)
36
#define cli_debug(f, a...) g_debug(f, ##a)
38
gboolean requestSysState(int state, powerd_cookie_t *cookie);
39
gboolean clearSysState(powerd_cookie_t cookie);
40
void powerd_cli_client_test(GDBusProxy *proxy);
42
#endif /* __POWERD_CLI_H__ */