1 /* vi:set et ai sw=2 sts=2 ts=2: */
3 * Copyright (c) 2012 GENIVI.
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/.
10 #ifndef __NSM_ENUM_TYPES_H__
11 #define __NSM_ENUM_TYPES_H__
13 #include <glib-object.h>
17 #define TYPE_NSM_SHUTDOWN_TYPE (nsm_shutdown_type_get_type ())
21 * @NSM_SHUTDOWN_TYPE_NOT : Client not registered for any shutdown.
22 * @NSM_SHUTDOWN_TYPE_NORMAL : Client registered for normal shutdown.
23 * @NSM_SHUTDOWN_TYPE_FAST : Client registered for fast shutdown.
24 * @NSM_SHUTDOWN_TYPE_RUNUP : The shutdown type "run up" can not be used
25 * for registration. Clients which are
26 * registered and have been shut down, will
27 * automatically be informed about the "runup",
28 * when the shutdown is cancelled.
30 * Shutdown modes supported by the Node State Manager.
32 typedef enum /*< flags >*/
34 NSM_SHUTDOWN_TYPE_NOT = 0x00000000U,
35 NSM_SHUTDOWN_TYPE_NORMAL = 0x00000001U,
36 NSM_SHUTDOWN_TYPE_FAST = 0x00000002U,
37 NSM_SHUTDOWN_TYPE_RUNUP = 0x80000000U,
40 GType nsm_shutdown_type_get_type (void) G_GNUC_CONST;
44 #define TYPE_NSM_ERROR_STATUS (nsm_error_status_get_type ())
48 * @NSM_ERROR_STATUS_NOT_SET : Initial value when error type is not set.
49 * @NSM_ERROR_STATUS_OK : Value when no error occurred.
50 * @NSM_ERROR_STATUS_ERROR : A general, non-specific error occurred.
51 * @NSM_ERROR_STATUS_DBUS : Error in D-Bus communication.
52 * @NSM_ERROR_STATUS_INTERNAL : Internal error (memory alloc. failed, etc.).
53 * @NSM_ERROR_STATUS_PARAMETER : A passed parameter was incorrect.
54 * @NSM_ERROR_STATUS_WRONG_SESSION : The requested session is unknown.
55 * @NSM_ERROR_STATUS_RESPONSE_PENDING : Command accepted, return value delivered asynch.
56 * @NSM_ERROR_STATUS_LAST : Last error value to identify valid errors.
58 * Error codes supported by the Node State Manager.
60 typedef enum /*< enum >*/
62 NSM_ERROR_STATUS_NOT_SET,
64 NSM_ERROR_STATUS_ERROR,
65 NSM_ERROR_STATUS_DBUS,
66 NSM_ERROR_STATUS_INTERNAL,
67 NSM_ERROR_STATUS_PARAMETER,
68 NSM_ERROR_STATUS_WRONG_SESSION,
69 NSM_ERROR_STATUS_RESPONSE_PENDING,
70 NSM_ERROR_STATUS_LAST,
73 GType nsm_error_status_get_type (void) G_GNUC_CONST;
77 #define TYPE_NSM_NODE_STATE (nsm_node_state_get_type ())
81 * @NSM_NODE_STATE_NOT_SET : Initial state when node state is not set.
82 * @NSM_NODE_STATE_START_UP : Basic system is starting up.
83 * @NSM_NODE_STATE_BASE_RUNNING : Basic system components have been started.
84 * @NSM_NODE_STATE_LUC_RUNNING : All 'Last User Context' components have been started.
85 * @NSM_NODE_STATE_FULLY_RUNNING : All 'foreground' components have been started.
86 * @NSM_NODE_STATE_FULLY_OPERATIONAL : All components have been started.
87 * @NSM_NODE_STATE_SHUTTING_DOWN : The system is shutting down.
88 * @NSM_NODE_STATE_SHUTDOWN_DELAY : Shutdown request active. System will shutdown soon.
89 * @NSM_NODE_STATE_FAST_SHUTDOWN : Fast shutdown active.
90 * @NSM_NODE_STATE_DEGRADED_POWER : Node is in degraded power state.
91 * @NSM_NODE_STATE_SHUTDOWN : Node is completely shut down.
92 * @NSM_NODE_STATE_LAST : Last valid entry to identify valid node states.
94 * Node states supported by the Node State Manager.
96 typedef enum /*< enum >*/
98 NSM_NODE_STATE_NOT_SET,
99 NSM_NODE_STATE_START_UP,
100 NSM_NODE_STATE_BASE_RUNNING,
101 NSM_NODE_STATE_LUC_RUNNING,
102 NSM_NODE_STATE_FULLY_RUNNING,
103 NSM_NODE_STATE_FULLY_OPERATIONAL,
104 NSM_NODE_STATE_SHUTTING_DOWN,
105 NSM_NODE_STATE_SHUTDOWN_DELAY,
106 NSM_NODE_STATE_FAST_SHUTDOWN,
107 NSM_NODE_STATE_DEGRADED_POWER,
108 NSM_NODE_STATE_SHUTDOWN,
112 GType nsm_node_state_get_type (void) G_GNUC_CONST;
116 #endif /* !__NSM_ENUM_TYPES_H__ */