summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2022-02-22 16:13:14 +0100
committerAleksander Morgado <aleksander@aleksander.es>2022-02-26 22:23:32 +0100
commit370d824e2b389321f259a9cdbf6c8bcd6e642691 (patch)
tree6193283f70e717a1e1a727da39bcb561d688a1c7 /src
parentd0ec31c844374b8047e4ecae1e74e45f50c1f7bf (diff)
downloadlibqmi-370d824e2b389321f259a9cdbf6c8bcd6e642691.tar.gz
pdc: skip the need of the QmiConfigTypeAndId intermediate struct
Diffstat (limited to 'src')
-rw-r--r--src/libqmi-glib/qmi-compat.c111
-rw-r--r--src/libqmi-glib/qmi-compat.h176
2 files changed, 287 insertions, 0 deletions
diff --git a/src/libqmi-glib/qmi-compat.c b/src/libqmi-glib/qmi-compat.c
index e10c29e5..8854033c 100644
--- a/src/libqmi-glib/qmi-compat.c
+++ b/src/libqmi-glib/qmi-compat.c
@@ -2123,4 +2123,115 @@ qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit_include_
#endif /* HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE */
+#if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE
+
+gboolean
+qmi_message_pdc_config_change_input_get_type_with_id (
+ QmiMessagePdcConfigChangeInput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM;
+ GArray *id = NULL;
+
+ if (!qmi_message_pdc_config_change_input_get_type_with_id_v2 (self, &config_type, &id, error))
+ return FALSE;
+ if (value_type_with_id) {
+ value_type_with_id->config_type = config_type;
+ value_type_with_id->id = id;
+ }
+ return TRUE;
+}
+
+gboolean
+qmi_message_pdc_config_change_input_set_type_with_id (
+ QmiMessagePdcConfigChangeInput *self,
+ const QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ return qmi_message_pdc_config_change_input_set_type_with_id_v2 (self, value_type_with_id->config_type, value_type_with_id->id, error);
+}
+
+gboolean
+qmi_message_pdc_config_change_output_get_type_with_id (
+ QmiMessagePdcConfigChangeOutput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM;
+ GArray *id = NULL;
+
+ if (!qmi_message_pdc_config_change_output_get_type_with_id_v2 (self, &config_type, &id, error))
+ return FALSE;
+ if (value_type_with_id) {
+ value_type_with_id->config_type = config_type;
+ value_type_with_id->id = id;
+ }
+ return TRUE;
+}
+
+#endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE */
+
+#if defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG
+
+gboolean
+qmi_message_pdc_set_selected_config_input_get_type_with_id (
+ QmiMessagePdcSetSelectedConfigInput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM;
+ GArray *id = NULL;
+
+ if (!qmi_message_pdc_set_selected_config_input_get_type_with_id_v2 (self, &config_type, &id, error))
+ return FALSE;
+ if (value_type_with_id) {
+ value_type_with_id->config_type = config_type;
+ value_type_with_id->id = id;
+ }
+ return TRUE;
+}
+
+gboolean
+qmi_message_pdc_set_selected_config_input_set_type_with_id (
+ QmiMessagePdcSetSelectedConfigInput *self,
+ const QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ return qmi_message_pdc_set_selected_config_input_set_type_with_id_v2 (self, value_type_with_id->config_type, value_type_with_id->id, error);
+}
+
+#endif /* HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG */
+
+#if defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO
+
+gboolean
+qmi_message_pdc_get_config_info_input_get_type_with_id (
+ QmiMessagePdcGetConfigInfoInput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM;
+ GArray *id = NULL;
+
+ if (!qmi_message_pdc_get_config_info_input_get_type_with_id_v2 (self, &config_type, &id, error))
+ return FALSE;
+ if (value_type_with_id) {
+ value_type_with_id->config_type = config_type;
+ value_type_with_id->id = id;
+ }
+ return TRUE;
+}
+
+gboolean
+qmi_message_pdc_get_config_info_input_set_type_with_id (
+ QmiMessagePdcGetConfigInfoInput *self,
+ const QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error)
+{
+ return qmi_message_pdc_get_config_info_input_set_type_with_id_v2 (self, value_type_with_id->config_type, value_type_with_id->id, error);
+}
+
+#endif /* HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */
+
#endif /* QMI_DISABLE_DEPRECATED */
diff --git a/src/libqmi-glib/qmi-compat.h b/src/libqmi-glib/qmi-compat.h
index 0a08ae2a..7b6933e7 100644
--- a/src/libqmi-glib/qmi-compat.h
+++ b/src/libqmi-glib/qmi-compat.h
@@ -34,8 +34,10 @@
#include "qmi-uim.h"
#include "qmi-wda.h"
#include "qmi-wds.h"
+#include "qmi-pdc.h"
#include "qmi-enums-nas.h"
#include "qmi-enums-wms.h"
+#include "qmi-enums-pdc.h"
/**
* SECTION:qmi-compat
@@ -3409,6 +3411,180 @@ gboolean qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit
#endif /* HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE */
+#if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE || \
+ defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG || \
+ defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO
+
+/**
+ * QmiConfigTypeAndId:
+ * @config_type: a #QmiPdcConfigurationType.
+ * @id: a #GArray of #guint8 elements.
+ *
+ * A QmiConfigTypeAndId struct.
+ *
+ * This type is deprecated and there is no replacement as the
+ * new methods don't require any intermediate type any more.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32
+ */
+typedef struct _QmiDeprecatedConfigTypeAndId {
+ QmiPdcConfigurationType config_type;
+ GArray *id;
+} QmiDeprecatedConfigTypeAndId;
+G_DEPRECATED
+typedef QmiDeprecatedConfigTypeAndId QmiConfigTypeAndId;
+
+#endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE
+ * HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG
+ * HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */
+
+#if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE
+
+/**
+ * qmi_message_pdc_config_change_input_get_type_with_id:
+ * @self: a #QmiMessagePdcConfigChangeInput.
+ * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required.
+ * @error: Return location for error or %NULL.
+ *
+ * Get the 'Type With Id' field from @self.
+ *
+ * Returns: (skip): %TRUE if the field is found, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_config_change_input_get_type_with_id_v2() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_config_change_input_get_type_with_id_v2)
+gboolean qmi_message_pdc_config_change_input_get_type_with_id (
+ QmiMessagePdcConfigChangeInput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+/**
+ * qmi_message_pdc_config_change_input_set_type_with_id:
+ * @self: a #QmiMessagePdcConfigChangeInput.
+ * @value_type_with_id: the address of the #QmiConfigTypeAndId to set.
+ * @error: Return location for error or %NULL.
+ *
+ * Set the 'Type With Id' field in the message.
+ *
+ * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_config_change_input_set_type_with_id_v2() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_config_change_input_set_type_with_id_v2)
+gboolean qmi_message_pdc_config_change_input_set_type_with_id (
+ QmiMessagePdcConfigChangeInput *self,
+ const QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+/**
+ * qmi_message_pdc_config_change_output_get_type_with_id:
+ * @self: a #QmiMessagePdcConfigChangeOutput.
+ * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required.
+ * @error: Return location for error or %NULL.
+ *
+ * Get the 'Type With Id' field from @self.
+ *
+ * Returns: (skip): %TRUE if the field is found, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_config_change_output_get_type_with_id_v2() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_config_change_output_get_type_with_id_v2)
+gboolean qmi_message_pdc_config_change_output_get_type_with_id (
+ QmiMessagePdcConfigChangeOutput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+#endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE */
+
+#if defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG
+
+/**
+ * qmi_message_pdc_set_selected_config_input_get_type_with_id:
+ * @self: a #QmiMessagePdcSetSelectedConfigInput.
+ * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required.
+ * @error: Return location for error or %NULL.
+ *
+ * Get the 'Type With Id' field from @self.
+ *
+ * Returns: (skip): %TRUE if the field is found, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_set_selected_config_input_get_type_with_id_v2() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_set_selected_config_input_get_type_with_id_v2)
+gboolean qmi_message_pdc_set_selected_config_input_get_type_with_id (
+ QmiMessagePdcSetSelectedConfigInput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+
+/**
+ * qmi_message_pdc_set_selected_config_input_set_type_with_id:
+ * @self: a #QmiMessagePdcSetSelectedConfigInput.
+ * @value_type_with_id: the address of the #QmiConfigTypeAndId to set.
+ * @error: Return location for error or %NULL.
+ *
+ * Set the 'Type With Id' field in the message.
+ *
+ * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_set_selected_config_input_set_type_with_id() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_set_selected_config_input_set_type_with_id_v2)
+gboolean qmi_message_pdc_set_selected_config_input_set_type_with_id (
+ QmiMessagePdcSetSelectedConfigInput *self,
+ const QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+#endif /* HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG */
+
+#if defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO
+
+/**
+ * qmi_message_pdc_get_config_info_input_get_type_with_id:
+ * @self: a #QmiMessagePdcGetConfigInfoInput.
+ * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required.
+ * @error: Return location for error or %NULL.
+ *
+ * Get the 'Type With Id' field from @self.
+ *
+ * Returns: (skip): %TRUE if the field is found, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_get_config_info_input_get_type_with_id_v2() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_get_config_info_input_get_type_with_id_v2)
+gboolean qmi_message_pdc_get_config_info_input_get_type_with_id (
+ QmiMessagePdcGetConfigInfoInput *self,
+ QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+/**
+ * qmi_message_pdc_get_config_info_input_set_type_with_id:
+ * @self: a #QmiMessagePdcGetConfigInfoInput.
+ * @value_type_with_id: the address of the #QmiConfigTypeAndId to set.
+ * @error: Return location for error or %NULL.
+ *
+ * Set the 'Type With Id' field in the message.
+ *
+ * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise.
+ *
+ * Since: 1.18
+ * Deprecated: 1.32: Use qmi_message_pdc_get_config_info_input_set_type_with_id_v2() instead.
+ */
+G_DEPRECATED_FOR (qmi_message_pdc_get_config_info_input_set_type_with_id_v2)
+gboolean qmi_message_pdc_get_config_info_input_set_type_with_id (
+ QmiMessagePdcGetConfigInfoInput *self,
+ const QmiDeprecatedConfigTypeAndId *value_type_with_id,
+ GError **error);
+
+#endif /* HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */
+
#endif /* QMI_DISABLE_DEPRECATED */
#endif /* _LIBQMI_GLIB_QMI_COMPAT_H_ */