Disable gtk-doc since the build fails
[profile/ivi/node-startup-controller.git] / common / nsm-enum-types.c
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 #ifdef HAVE_CONFIG_H
11 #include <config.h>
12 #endif
13
14 #include <glib/gi18n.h>
15 #include <glib-object.h>
16
17 #include <common/nsm-enum-types.h>
18
19
20
21 GType
22 nsm_shutdown_type_get_type (void)
23 {
24   GType type = G_TYPE_INVALID;
25
26   if (G_UNLIKELY (type == G_TYPE_INVALID))
27     {
28       static const GFlagsValue values[] =
29       {
30         { NSM_SHUTDOWN_TYPE_NOT,    "NSM_SHUTDOWN_TYPE_NOT",    N_ ("No shutdown"),        },
31         { NSM_SHUTDOWN_TYPE_NORMAL, "NSM_SHUTDOWN_TYPE_NORMAL", N_ ("Normal shutdown"),    },
32         { NSM_SHUTDOWN_TYPE_FAST,   "NSM_SHUTDOWN_TYPE_FAST",   N_ ("Fast shutdown"),      },
33         { NSM_SHUTDOWN_TYPE_RUNUP,  "NSM_SHUTDOWN_TYPE_RUNUP",  N_ ("Shutdown cancelled"), },
34         { 0 ,                       NULL,                       NULL,                      },
35       };
36
37       type = g_flags_register_static ("NSMShutdownType", values); 
38     }
39   return type;
40 }
41
42
43
44 GType
45 nsm_error_status_get_type (void)
46 {
47   GType type = G_TYPE_INVALID;
48
49   if (G_UNLIKELY (type == G_TYPE_INVALID))
50     {
51       static const GEnumValue values[] =
52       {
53         { NSM_ERROR_STATUS_NOT_SET,          "NSM_ERROR_STATUS_NOT_SET",          N_ ("Error not set"),           },
54         { NSM_ERROR_STATUS_OK,               "NSM_ERROR_STATUS_OK",               N_ ("No error"),                },
55         { NSM_ERROR_STATUS_ERROR,            "NSM_ERROR_STATUS_ERROR",            N_ ("Non-specific error"),      },
56         { NSM_ERROR_STATUS_DBUS,             "NSM_ERROR_STATUS_DBUS",             N_ ("Dbus comunication error"), },
57         { NSM_ERROR_STATUS_INTERNAL,         "NSM_ERROR_STATUS_INTERNAL",         N_ ("Internal error"),          },
58         { NSM_ERROR_STATUS_PARAMETER,        "NSM_ERROR_STATUS_PARAMETER",        N_ ("Parameter wrong"),         },
59         { NSM_ERROR_STATUS_WRONG_SESSION,    "NSM_ERROR_STATUS_WRONG_SESSION",    N_ ("Unknown session"),         },
60         { NSM_ERROR_STATUS_RESPONSE_PENDING, "NSM_ERROR_STATUS_RESPONSE_PENDING", N_ ("Reponse pending"),         },
61         { NSM_ERROR_STATUS_LAST,             "NSM_ERROR_STATUS_LAST",             N_ ("Last error"),              },
62         { 0 ,                                NULL,                                NULL,                           },
63       };
64
65       type = g_enum_register_static ("NSMErrorStatus", values);
66     }
67   return type;
68 }
69
70
71
72 GType
73 nsm_node_state_get_type (void)
74 {
75   GType type = G_TYPE_INVALID;
76
77   if (G_UNLIKELY (type == G_TYPE_INVALID))
78     {
79       static const GEnumValue values[] =
80       {
81         { NSM_NODE_STATE_NOT_SET,           "NSM_NODE_STATE_NOT_SET",           N_ ("Node sate not set"),             },
82         { NSM_NODE_STATE_START_UP,          "NSM_NODE_STATE_START_UP",          N_ ("Start basic system"),            },
83         { NSM_NODE_STATE_BASE_RUNNING,      "NSM_NODE_STATE_BASE_RUNNING",      N_ ("Basic components started"),      },
84         { NSM_NODE_STATE_LUC_RUNNING,       "NSM_NODE_STATE_LUC_RUNNING",       N_ ("LUC components started"),        },
85         { NSM_NODE_STATE_FULLY_RUNNING,     "NSM_NODE_STATE_FULLY_RUNNING",     N_ ("Foreground components started"), },
86         { NSM_NODE_STATE_FULLY_OPERATIONAL, "NSM_NODE_STATE_FULLY_OPERATIONAL", N_ ("All components started"),        },
87         { NSM_NODE_STATE_SHUTTING_DOWN,     "NSM_NODE_STATE_SHUTTING_DOWN",     N_ ("Shutdown the system"),           },
88         { NSM_NODE_STATE_FAST_SHUTDOWN,     "NSM_NODE_STATE_FAST_SHUTDOWN",     N_ ("Fast shutdown active"),          },
89         { NSM_NODE_STATE_DEGRADED_POWER,    "NSM_NODE_STATE_DEGRADED_POWER",    N_ ("Power state node degraded"),     },
90         { NSM_NODE_STATE_SHUTDOWN,          "NSM_NODE_STATE_SHUTDOWN",          N_ ("Node shut down"),                },
91         { NSM_NODE_STATE_LAST,              "NSM_NODE_STATE_LAST",              N_ ("Last node state"),               },
92         { 0 ,                               NULL,                               NULL,                                 },
93       };
94
95       type = g_enum_register_static ("NSMNodeState", values);
96     }
97   return type;
98 }