diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libqmi-glib/Makefile.am | 2 | ||||
-rw-r--r-- | src/libqmi-glib/libqmi-glib.h | 2 | ||||
-rw-r--r-- | src/libqmi-glib/qmi-compat.c | 106 | ||||
-rw-r--r-- | src/libqmi-glib/qmi-compat.h | 58 |
4 files changed, 168 insertions, 0 deletions
diff --git a/src/libqmi-glib/Makefile.am b/src/libqmi-glib/Makefile.am index e046897..b24e3ae 100644 --- a/src/libqmi-glib/Makefile.am +++ b/src/libqmi-glib/Makefile.am @@ -31,6 +31,7 @@ libqmi_glib_la_SOURCES = \ qmi-enums-voice.h \ qmi-enums.h qmi-enums-private.h \ qmi-utils.h qmi-utils.c \ + qmi-compat.h qmi-compat.c \ qmi-message.h qmi-message.c \ qmi-device.h qmi-device.c \ qmi-client.h qmi-client.c \ @@ -50,6 +51,7 @@ include_HEADERS = \ qmi-errors.h \ qmi-enums.h \ qmi-enums-private.h \ + qmi-compat.h \ qmi-enums-dms.h qmi-flags64-dms.h \ qmi-enums-wds.h \ qmi-enums-nas.h qmi-flags64-nas.h \ diff --git a/src/libqmi-glib/libqmi-glib.h b/src/libqmi-glib/libqmi-glib.h index bb03e96..12f9974 100644 --- a/src/libqmi-glib/libqmi-glib.h +++ b/src/libqmi-glib/libqmi-glib.h @@ -36,6 +36,8 @@ #include "qmi-enums.h" #include "qmi-utils.h" +#include "qmi-compat.h" + #include "qmi-enums-dms.h" #include "qmi-flags64-dms.h" #include "qmi-dms.h" diff --git a/src/libqmi-glib/qmi-compat.c b/src/libqmi-glib/qmi-compat.c new file mode 100644 index 0000000..0e76e96 --- /dev/null +++ b/src/libqmi-glib/qmi-compat.c @@ -0,0 +1,106 @@ + +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es> + */ + +#include "qmi-compat.h" + +/** + * qmi_message_dms_set_service_programming_code_input_get_new: + * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. + * @arg_new: a placeholder for the output constant string, or %NULL if not required. + * @error: Return location for error or %NULL. + * + * Get the 'New Code' field from @self. + * + * Returns: %TRUE if the field is found, %FALSE otherwise. + * + * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_get_new_code() instead. + */ +gboolean +qmi_message_dms_set_service_programming_code_input_get_new ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar **arg_new, + GError **error) +{ + return qmi_message_dms_set_service_programming_code_input_get_new_code (self, arg_new, error); +} + +/** + * qmi_message_dms_set_service_programming_code_input_set_new: + * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. + * @arg_new: a constant string of exactly 6 characters. + * @error: Return location for error or %NULL. + * + * Set the 'New Code' field in the message. + * + * Returns: %TRUE if @value was successfully set, %FALSE otherwise. + * + * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_set_new_code() instead. + */ +gboolean +qmi_message_dms_set_service_programming_code_input_set_new ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar *arg_new, + GError **error) +{ + return qmi_message_dms_set_service_programming_code_input_set_new_code (self, arg_new, error); +} + +/** + * qmi_message_dms_set_service_programming_code_input_get_current: + * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. + * @arg_current: a placeholder for the output constant string, or %NULL if not required. + * @error: Return location for error or %NULL. + * + * Get the 'Current Code' field from @self. + * + * Returns: %TRUE if the field is found, %FALSE otherwise. + * + * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_get_current_code() instead. + */ +gboolean +qmi_message_dms_set_service_programming_code_input_get_current ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar **arg_current, + GError **error) +{ + return qmi_message_dms_set_service_programming_code_input_get_current_code (self, arg_current, error); +} + +/** + * qmi_message_dms_set_service_programming_code_input_set_current: + * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. + * @arg_current: a placeholder for the output constant string, or %NULL if not required. + * @error: Return location for error or %NULL. + * + * Get the 'Current Code' field from @self. + * + * Returns: %TRUE if the field is found, %FALSE otherwise. + * + * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_set_current_code() instead. + */ +gboolean +qmi_message_dms_set_service_programming_code_input_set_current ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar *arg_current, + GError **error) +{ + return qmi_message_dms_set_service_programming_code_input_set_current_code (self, arg_current, error); +} diff --git a/src/libqmi-glib/qmi-compat.h b/src/libqmi-glib/qmi-compat.h new file mode 100644 index 0000000..0241c7d --- /dev/null +++ b/src/libqmi-glib/qmi-compat.h @@ -0,0 +1,58 @@ + +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es> + */ + +#ifndef _LIBQMI_GLIB_QMI_COMPAT_H_ +#define _LIBQMI_GLIB_QMI_COMPAT_H_ + +#if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) +#error "Only <libqmi-glib.h> can be included directly." +#endif + +#include "qmi-dms.h" + +/* These are compatibility methods and symbols to cover some API breaks + * introduced in 1.14.0 */ + +G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_get_new_code) +gboolean qmi_message_dms_set_service_programming_code_input_get_new ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar **arg_new, + GError **error); + +G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_set_new_code) +gboolean qmi_message_dms_set_service_programming_code_input_set_new ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar *arg_new, + GError **error); + +G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_get_current_code) +gboolean qmi_message_dms_set_service_programming_code_input_get_current ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar **arg_current, + GError **error); + +G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_set_current_code) +gboolean qmi_message_dms_set_service_programming_code_input_set_current ( + QmiMessageDmsSetServiceProgrammingCodeInput *self, + const gchar *arg_current, + GError **error); + +#endif /* _LIBQMI_GLIB_QMI_COMPAT_H_ */ |