diff options
Diffstat (limited to 'tst/stubs/gen')
-rw-r--r-- | tst/stubs/gen/nhm-dbus-info-stub.c | 97 | ||||
-rw-r--r-- | tst/stubs/gen/nhm-dbus-info-stub.h | 62 | ||||
-rw-r--r-- | tst/stubs/gen/nsm-dbus-consumer-stub.c | 98 | ||||
-rw-r--r-- | tst/stubs/gen/nsm-dbus-consumer-stub.h | 58 | ||||
-rw-r--r-- | tst/stubs/gen/nsm-dbus-lc-consumer-stub.c | 78 | ||||
-rw-r--r-- | tst/stubs/gen/nsm-dbus-lc-consumer-stub.h | 54 | ||||
-rw-r--r-- | tst/stubs/gen/nsm-dbus-lc-control-stub.c | 123 | ||||
-rw-r--r-- | tst/stubs/gen/nsm-dbus-lc-control-stub.h | 68 |
8 files changed, 638 insertions, 0 deletions
diff --git a/tst/stubs/gen/nhm-dbus-info-stub.c b/tst/stubs/gen/nhm-dbus-info-stub.c new file mode 100644 index 0000000..bca004f --- /dev/null +++ b/tst/stubs/gen/nhm-dbus-info-stub.c @@ -0,0 +1,97 @@ +/* NHM - NodeHealthMonitor + * + * Implementation of stubs for the nsm-dbus-consumer + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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/. + */ + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nhm-dbus-info.h> +#include <tst/stubs/gen/nhm-dbus-info-stub.h> + +/******************************************************************************* +* +* Exported variables and constants +* +*******************************************************************************/ + +gint nhm_dbus_info_complete_read_statistics_stub_CurrentFailCount = 0; +gint nhm_dbus_info_complete_read_statistics_stub_TotalFailures = 0; +gint nhm_dbus_info_complete_read_statistics_stub_TotalLifecycles = 0; +gint nhm_dbus_info_complete_request_node_restart_stub_ErrorStatus = 0; + + +/******************************************************************************* +* +* Interfaces. Exported functions. +* +*******************************************************************************/ + +/** + * nhm_dbus_info_emit_app_health_status_stub: + * + * Stub for nhm_dbus_info_emit_app_health_status() + */ +void +nhm_dbus_info_emit_app_health_status_stub(NhmDbusInfo *object, + const gchar *arg_AppName, + gint arg_AppStatus) +{ + +} + +/** + * nhm_dbus_info_complete_register_app_status_stub: + * + * Stub for nhm_dbus_info_complete_register_app_status() + */ +void +nhm_dbus_info_complete_register_app_status_stub(NhmDbusInfo *object, + GDBusMethodInvocation *invocation) +{ + +} + +/** + * nhm_dbus_info_complete_read_statistics_stub: + * + * Stub for nhm_dbus_info_complete_read_statistics() + */ +void +nhm_dbus_info_complete_read_statistics_stub(NhmDbusInfo *object, + GDBusMethodInvocation *invocation, + guint CurrentFailCount, + guint TotalFailures, + guint TotalLifecycles, + gint ErrorStatus) +{ + nhm_dbus_info_complete_read_statistics_stub_CurrentFailCount = CurrentFailCount; + nhm_dbus_info_complete_read_statistics_stub_TotalFailures = TotalFailures; + nhm_dbus_info_complete_read_statistics_stub_TotalLifecycles = TotalLifecycles; +} + +/** + * nhm_dbus_info_complete_request_node_restart_stub: + * + * Stub for nhm_dbus_info_complete_request_node_restart() + */ +void +nhm_dbus_info_complete_request_node_restart_stub(NhmDbusInfo *object, + GDBusMethodInvocation *invocation, + gint ErrorStatus) +{ + nhm_dbus_info_complete_request_node_restart_stub_ErrorStatus = ErrorStatus; +} + diff --git a/tst/stubs/gen/nhm-dbus-info-stub.h b/tst/stubs/gen/nhm-dbus-info-stub.h new file mode 100644 index 0000000..368593e --- /dev/null +++ b/tst/stubs/gen/nhm-dbus-info-stub.h @@ -0,0 +1,62 @@ +/* NHM - NodeHealthMonitor + * + * Definition of stubs for nhm-dbus-info + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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 NHM_DBUS_INFO_STUB_H +#define NHM_DBUS_INFO_STUB_H + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nhm-dbus-info.h> /* Header of real nsm-dbus-info */ + +/******************************************************************************* +* +* Exported variables, constants and defines +* +*******************************************************************************/ + +extern gint nhm_dbus_info_complete_read_statistics_stub_CurrentFailCount; +extern gint nhm_dbus_info_complete_read_statistics_stub_TotalFailures; +extern gint nhm_dbus_info_complete_read_statistics_stub_TotalLifecycles; +extern gint nhm_dbus_info_complete_request_node_restart_stub_ErrorStatus; + +/******************************************************************************* +* +* Exported functions +* +*******************************************************************************/ + +void nhm_dbus_info_emit_app_health_status_stub (NhmDbusInfo *object, + const gchar *arg_AppName, + gint arg_AppStatus); + +void nhm_dbus_info_complete_register_app_status_stub (NhmDbusInfo *object, + GDBusMethodInvocation *invocation); + +void nhm_dbus_info_complete_read_statistics_stub (NhmDbusInfo *object, + GDBusMethodInvocation *invocation, + guint CurrentFailCount, + guint TotalFailures, + guint TotalLifecycles, + gint ErrorStatus); + + +void nhm_dbus_info_complete_request_node_restart_stub(NhmDbusInfo *object, + GDBusMethodInvocation *invocation, + gint ErrorStatus); + +#endif /* NHM_DBUS_INFO_STUB_H */ diff --git a/tst/stubs/gen/nsm-dbus-consumer-stub.c b/tst/stubs/gen/nsm-dbus-consumer-stub.c new file mode 100644 index 0000000..03a24a2 --- /dev/null +++ b/tst/stubs/gen/nsm-dbus-consumer-stub.c @@ -0,0 +1,98 @@ +/* NHM - NodeHealthMonitor + * + * Implementation of stubs for the nsm-dbus-consumer + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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/. + */ + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nsm-dbus-consumer.h> +#include <tst/stubs/gen/nsm-dbus-consumer-stub.h> + +/******************************************************************************* +* +* Exported variables and constants +* +*******************************************************************************/ + +gboolean nsm_dbus_consumer_proxy_new_sync_stub_set_error = FALSE; +gboolean nsm_dbus_consumer_call_register_shutdown_client_sync_stub_set_error = FALSE; +gint nsm_dbus_consumer_call_register_shutdown_client_sync_stub_out_ErrorCode = 0; + + +/******************************************************************************* +* +* Interfaces. Exported functions. +* +*******************************************************************************/ + +/** + * nsm_dbus_consumer_proxy_new_sync_stub: + * + * Stub for nsm_dbus_consumer_proxy_new_sync() + */ +NsmDbusConsumer* +nsm_dbus_consumer_proxy_new_sync_stub(GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + NsmDbusConsumer *retval = NULL; + + if(nsm_dbus_consumer_proxy_new_sync_stub_set_error == FALSE) + { + retval = g_object_new(NSM_DBUS_TYPE_CONSUMER_PROXY, NULL); + } + else + { + retval = NULL; + g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL); + } + + return retval; +} + +/** + * nsm_dbus_consumer_call_register_shutdown_client_sync_stub: + * + * Stub for nsm_dbus_consumer_call_register_shutdown_client_sync() + */ +gboolean +nsm_dbus_consumer_call_register_shutdown_client_sync_stub(NsmDbusConsumer *proxy, + const gchar *arg_BusName, + const gchar *arg_ObjName, + guint arg_ShutdownMode, + guint arg_TimeoutMs, + gint *out_ErrorCode, + GCancellable *cancellable, + GError **error) +{ + gboolean retval = TRUE; + + if(nsm_dbus_consumer_call_register_shutdown_client_sync_stub_set_error == FALSE) + { + retval = TRUE; + *out_ErrorCode = nsm_dbus_consumer_call_register_shutdown_client_sync_stub_out_ErrorCode; + } + else + { + retval = FALSE; + g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL); + } + + return retval; +} diff --git a/tst/stubs/gen/nsm-dbus-consumer-stub.h b/tst/stubs/gen/nsm-dbus-consumer-stub.h new file mode 100644 index 0000000..8dbde6c --- /dev/null +++ b/tst/stubs/gen/nsm-dbus-consumer-stub.h @@ -0,0 +1,58 @@ +/* NHM - NodeHealthMonitor + * + * Definition of stubs for nsm-dbus-consumer + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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_DBUS_CONSUMER_STUB_H +#define NSM_DBUS_CONSUMER_STUB_H + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nsm-dbus-consumer.h> /* Header of real nsm-dbus-consumer */ + +/******************************************************************************* +* +* Exported variables, constants and defines +* +*******************************************************************************/ + +extern gboolean nsm_dbus_consumer_proxy_new_sync_stub_set_error; +extern gboolean nsm_dbus_consumer_call_register_shutdown_client_sync_stub_set_error; +extern gint nsm_dbus_consumer_call_register_shutdown_client_sync_stub_out_ErrorCode; + +/******************************************************************************* +* +* Exported functions +* +*******************************************************************************/ + +NsmDbusConsumer* nsm_dbus_consumer_proxy_new_sync_stub (GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +gboolean nsm_dbus_consumer_call_register_shutdown_client_sync_stub(NsmDbusConsumer *proxy, + const gchar *arg_BusName, + const gchar *arg_ObjName, + guint arg_ShutdownMode, + guint arg_TimeoutMs, + gint *out_ErrorCode, + GCancellable *cancellable, + GError **error); + +#endif /* NSM_DBUS_CONSUMER_STUB_H */ diff --git a/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c b/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c new file mode 100644 index 0000000..82b0195 --- /dev/null +++ b/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c @@ -0,0 +1,78 @@ +/* NHM - NodeHealthMonitor + * + * Implementation of stubs for the nsm-dbus-lc-consumer + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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/. + */ + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nsm-dbus-lc-consumer.h> +#include <tst/stubs/gen/nsm-dbus-lc-consumer-stub.h> + +/******************************************************************************* +* +* Exported variables and constants +* +*******************************************************************************/ + +gboolean nsm_dbus_lc_consumer_proxy_new_sync_stub_set_error = FALSE; +gint nsm_dbus_lc_consumer_complete_lifecycle_request_stub_ErrorCode = 0; + +/******************************************************************************* +* +* Interfaces. Exported functions. +* +*******************************************************************************/ + +/** + * nsm_dbus_lc_consumer_proxy_new_sync_stub: + * + * Stub for nsm_dbus_lc_consumer_proxy_new_sync() + */ +NsmDbusLcConsumer* +nsm_dbus_lc_consumer_proxy_new_sync_stub(GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + NsmDbusLcConsumer *retval = NULL; + + if(nsm_dbus_lc_consumer_proxy_new_sync_stub_set_error == FALSE) + { + retval = g_object_new(NSM_DBUS_LC_TYPE_CONSUMER_PROXY, NULL); + } + else + { + retval = NULL; + g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL); + } + + return retval; +} + +/** + * nsm_dbus_lc_consumer_complete_lifecycle_request_stub: + * + * Stub for nsm_dbus_lc_consumer_complete_lifecycle_request() + */ +void +nsm_dbus_lc_consumer_complete_lifecycle_request_stub(NsmDbusLcConsumer *object, + GDBusMethodInvocation *invocation, + gint ErrorCode) +{ + nsm_dbus_lc_consumer_complete_lifecycle_request_stub_ErrorCode = ErrorCode; +} diff --git a/tst/stubs/gen/nsm-dbus-lc-consumer-stub.h b/tst/stubs/gen/nsm-dbus-lc-consumer-stub.h new file mode 100644 index 0000000..5e32057 --- /dev/null +++ b/tst/stubs/gen/nsm-dbus-lc-consumer-stub.h @@ -0,0 +1,54 @@ +/* NHM - NodeHealthMonitor + * + * Definition of stubs for nsm-dbus-lc-consumer + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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_DBUS_LC_CONSUMER_STUB_H +#define NSM_DBUS_LC_CONSUMER_STUB_H + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nsm-dbus-lc-consumer.h> /* Header of real nsm-dbus-lc-consumer */ + +/******************************************************************************* +* +* Exported variables, constants and defines +* +*******************************************************************************/ + +extern gboolean nsm_dbus_lc_consumer_proxy_new_sync_stub_set_error; +extern gint nsm_dbus_lc_consumer_complete_lifecycle_request_stub_ErrorCode; + +/******************************************************************************* +* +* Exported functions +* +*******************************************************************************/ + +NsmDbusLcConsumer* nsm_dbus_lc_consumer_proxy_new_sync_stub(GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +void nsm_dbus_lc_consumer_complete_lifecycle_request_stub (NsmDbusLcConsumer *object, + GDBusMethodInvocation *invocation, + gint ErrorCode); + +#endif /* NSM_DBUS_LC_CONSUMER_STUB_H */ + diff --git a/tst/stubs/gen/nsm-dbus-lc-control-stub.c b/tst/stubs/gen/nsm-dbus-lc-control-stub.c new file mode 100644 index 0000000..14e3096 --- /dev/null +++ b/tst/stubs/gen/nsm-dbus-lc-control-stub.c @@ -0,0 +1,123 @@ +/* NHM - NodeHealthMonitor + * + * Implementation of stubs for the nsm-dbus-lc-control + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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/. + */ + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nsm-dbus-lc-control.h> +#include <tst/stubs/gen/nsm-dbus-lc-control-stub.h> + +/******************************************************************************* +* +* Exported variables and constants +* +*******************************************************************************/ + +gboolean nsm_dbus_lc_control_proxy_new_sync_stub_set_error = FALSE; +gboolean nsm_dbus_lc_control_call_set_app_health_status_sync_stub_set_error = FALSE; +gboolean nsm_dbus_lc_control_call_request_node_restart_sync_stub_set_error = FALSE; +gint nsm_dbus_lc_control_call_request_node_restart_sync_stub_out_ErrorCode = 0; + +/******************************************************************************* +* +* Interfaces. Exported functions. +* +*******************************************************************************/ + +/** + * nsm_dbus_lc_control_proxy_new_sync_stub: + * + * Stub for nsm_dbus_lc_control_proxy_new_sync() + */ +NsmDbusLcControl* +nsm_dbus_lc_control_proxy_new_sync_stub(GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + NsmDbusLcControl* retval = NULL; + + if(nsm_dbus_lc_control_proxy_new_sync_stub_set_error == FALSE) + { + retval = g_object_new(NSM_DBUS_LC_TYPE_CONTROL_PROXY, NULL); + } + else + { + retval = NULL; + g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL); + } + + return retval; +} + +/** + * nsm_dbus_lc_control_call_set_app_health_status_sync_stub: + * + * Stub for nsm_dbus_lc_control_call_set_app_health_status_sync() + */ +gboolean +nsm_dbus_lc_control_call_set_app_health_status_sync_stub(NsmDbusLcControl *proxy, + const gchar *arg_AppName, + gboolean arg_AppRunning, + gint *out_ErrorCode, + GCancellable *cancellable, + GError **error) +{ + gboolean retval = FALSE; + + if(nsm_dbus_lc_control_call_set_app_health_status_sync_stub_set_error == FALSE) + { + retval = TRUE; + } + else + { + retval = FALSE; + g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL); + } + + return retval; +} + +/** + * nsm_dbus_lc_control_call_request_node_restart_sync_stub: + * + * Stub for nsm_dbus_lc_control_call_request_node_restart_sync() + */ +gboolean +nsm_dbus_lc_control_call_request_node_restart_sync_stub(NsmDbusLcControl *proxy, + gint arg_RestartReason, + guint arg_RestartType, + gint *out_ErrorCode, + GCancellable *cancellable, + GError **error) +{ + gboolean retval = FALSE; + + if(nsm_dbus_lc_control_call_request_node_restart_sync_stub_set_error == FALSE) + { + *out_ErrorCode = nsm_dbus_lc_control_call_request_node_restart_sync_stub_out_ErrorCode; + } + else + { + retval = FALSE; + g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL); + } + + return retval; +} diff --git a/tst/stubs/gen/nsm-dbus-lc-control-stub.h b/tst/stubs/gen/nsm-dbus-lc-control-stub.h new file mode 100644 index 0000000..80a554d --- /dev/null +++ b/tst/stubs/gen/nsm-dbus-lc-control-stub.h @@ -0,0 +1,68 @@ +/* NHM - NodeHealthMonitor + * + * Definition of stubs for nsm-dbus-lc-control + * + * Author: Jean-Pierre Bogler <Jean-Pierre.Bogler@continental-corporation.com> + * + * Copyright (C) 2013 Continental Automotive Systems, Inc. + * + * 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_DBUS_LC_CONTROL_STUB_H +#define NSM_DBUS_LC_CONTROL_STUB_H + +/******************************************************************************* +* +* Header includes +* +*******************************************************************************/ + +#include <gio/gio.h> +#include <gen/nsm-dbus-lc-control.h> /* Header of real nsm-dbus-lc-control */ + +/******************************************************************************* +* +* Exported variables, constants and defines +* +*******************************************************************************/ + +extern gboolean nsm_dbus_lc_control_proxy_new_sync_stub_set_error; +extern gboolean nsm_dbus_lc_control_call_set_app_health_status_sync_stub_set_error; +extern gboolean nsm_dbus_lc_control_call_request_node_restart_sync_stub_set_error; +extern gint nsm_dbus_lc_control_call_request_node_restart_sync_stub_out_ErrorCode; + +/******************************************************************************* +* +* Exported functions +* +*******************************************************************************/ + +NsmDbusLcControl* nsm_dbus_lc_control_proxy_new_sync_stub (GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + + +gboolean nsm_dbus_lc_control_call_set_app_health_status_sync_stub(NsmDbusLcControl *proxy, + const gchar *arg_AppName, + gboolean arg_AppRunning, + gint *out_ErrorCode, + GCancellable *cancellable, + GError **error); + + +gboolean nsm_dbus_lc_control_call_request_node_restart_sync_stub (NsmDbusLcControl *proxy, + gint arg_RestartReason, + guint arg_RestartType, + gint *out_ErrorCode, + GCancellable *cancellable, + GError **error); + + +#endif /* NSM_DBUS_LC_CONTROL_STUB_H */ |