summaryrefslogtreecommitdiff
path: root/common/nsm-enum-types.h
blob: 4a4226d7995a693e3eed8c178d9de1922d245901 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* vi:set et ai sw=2 sts=2 ts=2: */
/* -
 * Copyright (c) 2012 GENIVI.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef __NSM_ENUM_TYPES_H__
#define __NSM_ENUM_TYPES_H__

#include <glib-object.h>

G_BEGIN_DECLS

#define TYPE_NSM_SHUTDOWN_TYPE (nsm_shutdown_type_get_type ())

/**
 * NSMShutdownType:
 * @NSM_SHUTDOWN_TYPE_NOT    : Client not registered for any shutdown.
 * @NSM_SHUTDOWN_TYPE_NORMAL : Client registered for normal shutdown.
 * @NSM_SHUTDOWN_TYPE_FAST   : Client registered for fast shutdown.
 * @NSM_SHUTDOWN_TYPE_RUNUP  : The shutdown type "run up" can not be used
 *                             for registration. Clients which are
 *                             registered and have been shut down, will
 *                             automatically be informed about the "runup",
 *                             when the shutdown is cancelled.
 *
 * Shutdown modes supported by the Node State Manager.
 */
typedef enum /*< flags >*/
{
  NSM_SHUTDOWN_TYPE_NOT    = 0x00000000U,
  NSM_SHUTDOWN_TYPE_NORMAL = 0x00000001U,
  NSM_SHUTDOWN_TYPE_FAST   = 0x00000002U,
  NSM_SHUTDOWN_TYPE_RUNUP  = 0x80000000U, 
} NSMShutdownType;

GType nsm_shutdown_type_get_type (void) G_GNUC_CONST;



#define TYPE_NSM_ERROR_STATUS (nsm_error_status_get_type ())

/**
 * NSMErrorStatus:
 * @NSM_ERROR_STATUS_NOT_SET          : Initial value when error type is not set.
 * @NSM_ERROR_STATUS_OK               : Value when no error occurred.
 * @NSM_ERROR_STATUS_ERROR            : A general, non-specific error occurred.
 * @NSM_ERROR_STATUS_DBUS             : Error in D-Bus communication.
 * @NSM_ERROR_STATUS_INTERNAL         : Internal error (memory alloc. failed, etc.).
 * @NSM_ERROR_STATUS_PARAMETER        : A passed parameter was incorrect.
 * @NSM_ERROR_STATUS_WRONG_SESSION    : The requested session is unknown.
 * @NSM_ERROR_STATUS_RESPONSE_PENDING : Command accepted, return value delivered asynch.
 * @NSM_ERROR_STATUS_LAST             : Last error value to identify valid errors.
 *
 * Error codes supported by the Node State Manager.
 */
typedef enum /*< enum >*/
{
  NSM_ERROR_STATUS_NOT_SET,
  NSM_ERROR_STATUS_OK,
  NSM_ERROR_STATUS_ERROR,
  NSM_ERROR_STATUS_DBUS,
  NSM_ERROR_STATUS_INTERNAL,
  NSM_ERROR_STATUS_PARAMETER,
  NSM_ERROR_STATUS_WRONG_SESSION,
  NSM_ERROR_STATUS_RESPONSE_PENDING,
  NSM_ERROR_STATUS_LAST,
} NSMErrorStatus;

GType nsm_error_status_get_type (void) G_GNUC_CONST;



#define TYPE_NSM_NODE_STATE (nsm_node_state_get_type ())

/**
 * NSMNodeState:
 * @NSM_NODE_STATE_NOT_SET           : Initial state when node state is not set.
 * @NSM_NODE_STATE_START_UP          : Basic system is starting up.
 * @NSM_NODE_STATE_BASE_RUNNING      : Basic system components have been started.
 * @NSM_NODE_STATE_LUC_RUNNING       : All 'Last User Context' components have been started.
 * @NSM_NODE_STATE_FULLY_RUNNING     : All 'foreground' components have been started.
 * @NSM_NODE_STATE_FULLY_OPERATIONAL : All components have been started.
 * @NSM_NODE_STATE_SHUTTING_DOWN     : The system is shutting down.
 * @NSM_NODE_STATE_SHUTDOWN_DELAY    : Shutdown request active. System will shutdown soon.
 * @NSM_NODE_STATE_FAST_SHUTDOWN     : Fast shutdown active.
 * @NSM_NODE_STATE_DEGRADED_POWER    : Node is in degraded power state.
 * @NSM_NODE_STATE_SHUTDOWN          : Node is completely shut down.
 * @NSM_NODE_STATE_LAST              : Last valid entry to identify valid node states.
 *
 * Node states supported by the Node State Manager.
 */
typedef enum /*< enum >*/
{
  NSM_NODE_STATE_NOT_SET,
  NSM_NODE_STATE_START_UP,
  NSM_NODE_STATE_BASE_RUNNING,
  NSM_NODE_STATE_LUC_RUNNING,
  NSM_NODE_STATE_FULLY_RUNNING,
  NSM_NODE_STATE_FULLY_OPERATIONAL,
  NSM_NODE_STATE_SHUTTING_DOWN,
  NSM_NODE_STATE_SHUTDOWN_DELAY,
  NSM_NODE_STATE_FAST_SHUTDOWN,
  NSM_NODE_STATE_DEGRADED_POWER,
  NSM_NODE_STATE_SHUTDOWN,
  NSM_NODE_STATE_LAST,
} NSMNodeState;

GType nsm_node_state_get_type (void) G_GNUC_CONST;

G_END_DECLS

#endif /* !__NSM_ENUM_TYPES_H__ */