Add missing parentheses in macro definitions
[profile/ivi/node-startup-controller.git] / common / shutdown-client.h
1 /* vi:set et ai sw=2 sts=2 ts=2: */
2 /* -
3  * Copyright (c) 2012 GENIVI.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9
10 #ifndef __SHUTDOWN_CLIENT_H__
11 #define __SHUTDOWN_CLIENT_H__
12
13 #include <common/nsm-enum-types.h>
14 #include <common/shutdown-consumer-dbus.h>
15
16 G_BEGIN_DECLS
17
18 #define TYPE_SHUTDOWN_CLIENT            (shutdown_client_get_type ())
19 #define SHUTDOWN_CLIENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHUTDOWN_CLIENT, ShutdownClient))
20 #define SHUTDOWN_CLIENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHUTDOWN_CLIENT, ShutdownClientClass))
21 #define IS_SHUTDOWN_CLIENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHUTDOWN_CLIENT))
22 #define IS_SHUTDOWN_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHUTDOWN_CLIENT))
23 #define SHUTDOWN_CLIENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHUTDOWN_CLIENT, ShutdownClientClass))
24
25 typedef struct _ShutdownClientClass ShutdownClientClass;
26 typedef struct _ShutdownClient      ShutdownClient;
27
28 GType             shutdown_client_get_type          (void) G_GNUC_CONST;
29
30 ShutdownClient   *shutdown_client_new               (const gchar      *bus_name,
31                                                      const gchar      *object_path,
32                                                      NSMShutdownType   shutdown_mode,
33                                                      guint             timeout) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
34
35 const gchar      *shutdown_client_get_bus_name      (ShutdownClient   *client);
36 const gchar      *shutdown_client_get_object_path   (ShutdownClient   *client);
37 NSMShutdownType   shutdown_client_get_shutdown_mode (ShutdownClient   *client);
38 void              shutdown_client_set_shutdown_mode (ShutdownClient   *client,
39                                                      NSMShutdownType   shutdown_mode);
40 guint             shutdown_client_get_timeout       (ShutdownClient   *client);
41 void              shutdown_client_set_timeout       (ShutdownClient   *client,
42                                                      guint             timeout);
43 ShutdownConsumer *shutdown_client_get_consumer      (ShutdownClient   *client);
44 void              shutdown_client_set_consumer      (ShutdownClient   *client,
45                                                      ShutdownConsumer *consumer);
46
47 G_END_DECLS
48
49 #endif /* !__SHUTDOWN_CLIENT_H__ */
50