| 1 |
|
| 2 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 3 |
/* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the |
| 16 |
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 |
* Boston, MA 02110-1301 USA. |
| 18 |
* |
| 19 |
* Copyright (C) 2016-2022 Aleksander Morgado <[email protected]> |
| 20 |
*/ |
| 21 |
|
| 22 |
#include <string.h> |
| 23 |
|
| 24 |
#include "qmi-common.h" |
| 25 |
#include "qmi-compat.h" |
| 26 |
#include "qmi-helpers.h" |
| 27 |
#include "qmi-enum-types.h" |
| 28 |
#include "qmi-flag-types.h" |
| 29 |
|
| 30 |
#ifndef QMI_DISABLE_DEPRECATED |
| 31 |
|
| 32 |
/*****************************************************************************/ |
| 33 |
|
| 34 |
#if defined UTILS_ENABLE_TRACE |
| 35 |
static void |
| 36 |
print_read_bytes_trace (const gchar *type, |
| 37 |
gconstpointer buffer, |
| 38 |
gconstpointer out, |
| 39 |
guint n_bytes) |
| 40 |
{ |
| 41 |
gchar *str1; |
| 42 |
gchar *str2; |
| 43 |
|
| 44 |
str1 = qmi_common_str_hex (buffer, n_bytes, ':'); |
| 45 |
str2 = qmi_common_str_hex (out, n_bytes, ':'); |
| 46 |
|
| 47 |
g_debug ("Read %s (%s) --> (%s)", type, str1, str2); |
| 48 |
g_warn_if_fail (g_str_equal (str1, str2)); |
| 49 |
|
| 50 |
g_free (str1); |
| 51 |
g_free (str2); |
| 52 |
} |
| 53 |
#else |
| 54 |
#define print_read_bytes_trace(...) |
| 55 |
#endif |
| 56 |
|
| 57 |
void |
| 58 |
qmi_utils_read_guint8_from_buffer (const guint8 **buffer, |
| 59 |
guint16 *buffer_size, |
| 60 |
guint8 *out) |
| 61 |
{ |
| 62 |
g_assert (out != NULL); |
| 63 |
g_assert (buffer != NULL); |
| 64 |
g_assert (buffer_size != NULL); |
| 65 |
g_assert (*buffer_size >= 1); |
| 66 |
|
| 67 |
*out = (*buffer)[0]; |
| 68 |
|
| 69 |
print_read_bytes_trace ("guint8", &(*buffer)[0], out, 1); |
| 70 |
|
| 71 |
*buffer = &((*buffer)[1]); |
| 72 |
*buffer_size = (*buffer_size) - 1; |
| 73 |
} |
| 74 |
|
| 75 |
void |
| 76 |
qmi_utils_read_gint8_from_buffer (const guint8 **buffer, |
| 77 |
guint16 *buffer_size, |
| 78 |
gint8 *out) |
| 79 |
{ |
| 80 |
g_assert (out != NULL); |
| 81 |
g_assert (buffer != NULL); |
| 82 |
g_assert (buffer_size != NULL); |
| 83 |
g_assert (*buffer_size >= 1); |
| 84 |
|
| 85 |
*out = (gint8)(*buffer)[0]; |
| 86 |
|
| 87 |
print_read_bytes_trace ("gint8", &(*buffer)[0], out, 1); |
| 88 |
|
| 89 |
*buffer = &((*buffer)[1]); |
| 90 |
*buffer_size = (*buffer_size) - 1; |
| 91 |
} |
| 92 |
|
| 93 |
void |
| 94 |
qmi_utils_read_guint16_from_buffer (const guint8 **buffer, |
| 95 |
guint16 *buffer_size, |
| 96 |
QmiEndian endian, |
| 97 |
guint16 *out) |
| 98 |
{ |
| 99 |
g_assert (out != NULL); |
| 100 |
g_assert (buffer != NULL); |
| 101 |
g_assert (buffer_size != NULL); |
| 102 |
g_assert (*buffer_size >= 2); |
| 103 |
|
| 104 |
memcpy (out, &((*buffer)[0]), 2); |
| 105 |
if (endian == QMI_ENDIAN_BIG) |
| 106 |
*out = GUINT16_FROM_BE (*out); |
| 107 |
else |
| 108 |
*out = GUINT16_FROM_LE (*out); |
| 109 |
|
| 110 |
print_read_bytes_trace ("guint16", &(*buffer)[0], out, 2); |
| 111 |
|
| 112 |
*buffer = &((*buffer)[2]); |
| 113 |
*buffer_size = (*buffer_size) - 2; |
| 114 |
} |
| 115 |
|
| 116 |
void |
| 117 |
qmi_utils_read_gint16_from_buffer (const guint8 **buffer, |
| 118 |
guint16 *buffer_size, |
| 119 |
QmiEndian endian, |
| 120 |
gint16 *out) |
| 121 |
{ |
| 122 |
g_assert (out != NULL); |
| 123 |
g_assert (buffer != NULL); |
| 124 |
g_assert (buffer_size != NULL); |
| 125 |
g_assert (*buffer_size >= 2); |
| 126 |
|
| 127 |
memcpy (out, &((*buffer)[0]), 2); |
| 128 |
if (endian == QMI_ENDIAN_BIG) |
| 129 |
*out = GINT16_FROM_BE (*out); |
| 130 |
else |
| 131 |
*out = GINT16_FROM_LE (*out); |
| 132 |
|
| 133 |
print_read_bytes_trace ("gint16", &(*buffer)[0], out, 2); |
| 134 |
|
| 135 |
*buffer = &((*buffer)[2]); |
| 136 |
*buffer_size = (*buffer_size) - 2; |
| 137 |
} |
| 138 |
|
| 139 |
void |
| 140 |
qmi_utils_read_guint32_from_buffer (const guint8 **buffer, |
| 141 |
guint16 *buffer_size, |
| 142 |
QmiEndian endian, |
| 143 |
guint32 *out) |
| 144 |
{ |
| 145 |
g_assert (out != NULL); |
| 146 |
g_assert (buffer != NULL); |
| 147 |
g_assert (buffer_size != NULL); |
| 148 |
g_assert (*buffer_size >= 4); |
| 149 |
|
| 150 |
memcpy (out, &((*buffer)[0]), 4); |
| 151 |
if (endian == QMI_ENDIAN_BIG) |
| 152 |
*out = GUINT32_FROM_BE (*out); |
| 153 |
else |
| 154 |
*out = GUINT32_FROM_LE (*out); |
| 155 |
|
| 156 |
print_read_bytes_trace ("guint32", &(*buffer)[0], out, 4); |
| 157 |
|
| 158 |
*buffer = &((*buffer)[4]); |
| 159 |
*buffer_size = (*buffer_size) - 4; |
| 160 |
} |
| 161 |
|
| 162 |
void |
| 163 |
qmi_utils_read_gint32_from_buffer (const guint8 **buffer, |
| 164 |
guint16 *buffer_size, |
| 165 |
QmiEndian endian, |
| 166 |
gint32 *out) |
| 167 |
{ |
| 168 |
g_assert (out != NULL); |
| 169 |
g_assert (buffer != NULL); |
| 170 |
g_assert (buffer_size != NULL); |
| 171 |
g_assert (*buffer_size >= 4); |
| 172 |
|
| 173 |
memcpy (out, &((*buffer)[0]), 4); |
| 174 |
if (endian == QMI_ENDIAN_BIG) |
| 175 |
*out = GINT32_FROM_BE (*out); |
| 176 |
else |
| 177 |
*out = GINT32_FROM_LE (*out); |
| 178 |
|
| 179 |
print_read_bytes_trace ("gint32", &(*buffer)[0], out, 4); |
| 180 |
|
| 181 |
*buffer = &((*buffer)[4]); |
| 182 |
*buffer_size = (*buffer_size) - 4; |
| 183 |
} |
| 184 |
|
| 185 |
void |
| 186 |
qmi_utils_read_guint64_from_buffer (const guint8 **buffer, |
| 187 |
guint16 *buffer_size, |
| 188 |
QmiEndian endian, |
| 189 |
guint64 *out) |
| 190 |
{ |
| 191 |
g_assert (out != NULL); |
| 192 |
g_assert (buffer != NULL); |
| 193 |
g_assert (buffer_size != NULL); |
| 194 |
g_assert (*buffer_size >= 8); |
| 195 |
|
| 196 |
memcpy (out, &((*buffer)[0]), 8); |
| 197 |
if (endian == QMI_ENDIAN_BIG) |
| 198 |
*out = GUINT64_FROM_BE (*out); |
| 199 |
else |
| 200 |
*out = GUINT64_FROM_LE (*out); |
| 201 |
|
| 202 |
print_read_bytes_trace ("guint64", &(*buffer)[0], out, 8); |
| 203 |
|
| 204 |
*buffer = &((*buffer)[8]); |
| 205 |
*buffer_size = (*buffer_size) - 8; |
| 206 |
} |
| 207 |
|
| 208 |
void |
| 209 |
qmi_utils_read_gint64_from_buffer (const guint8 **buffer, |
| 210 |
guint16 *buffer_size, |
| 211 |
QmiEndian endian, |
| 212 |
gint64 *out) |
| 213 |
{ |
| 214 |
g_assert (out != NULL); |
| 215 |
g_assert (buffer != NULL); |
| 216 |
g_assert (buffer_size != NULL); |
| 217 |
g_assert (*buffer_size >= 8); |
| 218 |
|
| 219 |
memcpy (out, &((*buffer)[0]), 8); |
| 220 |
if (endian == QMI_ENDIAN_BIG) |
| 221 |
*out = GINT64_FROM_BE (*out); |
| 222 |
else |
| 223 |
*out = GINT64_FROM_LE (*out); |
| 224 |
|
| 225 |
print_read_bytes_trace ("gint64", &(*buffer)[0], out, 8); |
| 226 |
|
| 227 |
*buffer = &((*buffer)[8]); |
| 228 |
*buffer_size = (*buffer_size) - 8; |
| 229 |
} |
| 230 |
|
| 231 |
void |
| 232 |
qmi_utils_read_sized_guint_from_buffer (const guint8 **buffer, |
| 233 |
guint16 *buffer_size, |
| 234 |
guint n_bytes, |
| 235 |
QmiEndian endian, |
| 236 |
guint64 *out) |
| 237 |
{ |
| 238 |
g_assert (out != NULL); |
| 239 |
g_assert (buffer != NULL); |
| 240 |
g_assert (buffer_size != NULL); |
| 241 |
g_assert (*buffer_size >= n_bytes); |
| 242 |
g_assert (n_bytes <= 8); |
| 243 |
|
| 244 |
*out = 0; |
| 245 |
|
| 246 |
/* In Little Endian, we copy the bytes to the beginning of the output |
| 247 |
* buffer. */ |
| 248 |
if (endian == QMI_ENDIAN_LITTLE) { |
| 249 |
memcpy (out, *buffer, n_bytes); |
| 250 |
*out = GUINT64_FROM_LE (*out); |
| 251 |
} |
| 252 |
/* In Big Endian, we copy the bytes to the end of the output buffer */ |
| 253 |
else { |
| 254 |
guint8 tmp[8] = { 0 }; |
| 255 |
|
| 256 |
memcpy (&tmp[8 - n_bytes], *buffer, n_bytes); |
| 257 |
memcpy (out, &tmp[0], 8); |
| 258 |
*out = GUINT64_FROM_BE (*out); |
| 259 |
} |
| 260 |
|
| 261 |
*buffer = &((*buffer)[n_bytes]); |
| 262 |
*buffer_size = (*buffer_size) - n_bytes; |
| 263 |
} |
| 264 |
|
| 265 |
void |
| 266 |
qmi_utils_read_gfloat_from_buffer (const guint8 **buffer, |
| 267 |
guint16 *buffer_size, |
| 268 |
gfloat *out) |
| 269 |
{ |
| 270 |
g_assert (out != NULL); |
| 271 |
g_assert (buffer != NULL); |
| 272 |
g_assert (buffer_size != NULL); |
| 273 |
g_assert (*buffer_size >= 4); |
| 274 |
|
| 275 |
/* Yeah, do this for now */ |
| 276 |
memcpy (out, &((*buffer)[0]), 4); |
| 277 |
|
| 278 |
print_read_bytes_trace ("gfloat", &(*buffer)[0], out, 4); |
| 279 |
|
| 280 |
*buffer = &((*buffer)[4]); |
| 281 |
*buffer_size = (*buffer_size) - 4; |
| 282 |
} |
| 283 |
|
| 284 |
void |
| 285 |
qmi_utils_write_guint8_to_buffer (guint8 **buffer, |
| 286 |
guint16 *buffer_size, |
| 287 |
guint8 *in) |
| 288 |
{ |
| 289 |
g_assert (in != NULL); |
| 290 |
g_assert (buffer != NULL); |
| 291 |
g_assert (buffer_size != NULL); |
| 292 |
g_assert (*buffer_size >= 1); |
| 293 |
|
| 294 |
memcpy (&(*buffer)[0], in, sizeof (*in)); |
| 295 |
|
| 296 |
*buffer = &((*buffer)[1]); |
| 297 |
*buffer_size = (*buffer_size) - 1; |
| 298 |
} |
| 299 |
|
| 300 |
void |
| 301 |
qmi_utils_write_gint8_to_buffer (guint8 **buffer, |
| 302 |
guint16 *buffer_size, |
| 303 |
gint8 *in) |
| 304 |
{ |
| 305 |
g_assert (in != NULL); |
| 306 |
g_assert (buffer != NULL); |
| 307 |
g_assert (buffer_size != NULL); |
| 308 |
g_assert (*buffer_size >= 1); |
| 309 |
|
| 310 |
memcpy (&(*buffer)[0], in, sizeof (*in)); |
| 311 |
|
| 312 |
*buffer = &((*buffer)[1]); |
| 313 |
*buffer_size = (*buffer_size) - 1; |
| 314 |
} |
| 315 |
|
| 316 |
void |
| 317 |
qmi_utils_write_guint16_to_buffer (guint8 **buffer, |
| 318 |
guint16 *buffer_size, |
| 319 |
QmiEndian endian, |
| 320 |
guint16 *in) |
| 321 |
{ |
| 322 |
guint16 tmp; |
| 323 |
|
| 324 |
g_assert (in != NULL); |
| 325 |
g_assert (buffer != NULL); |
| 326 |
g_assert (buffer_size != NULL); |
| 327 |
g_assert (*buffer_size >= 2); |
| 328 |
|
| 329 |
if (endian == QMI_ENDIAN_BIG) |
| 330 |
tmp = GUINT16_TO_BE (*in); |
| 331 |
else |
| 332 |
tmp = GUINT16_TO_LE (*in); |
| 333 |
memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); |
| 334 |
|
| 335 |
*buffer = &((*buffer)[2]); |
| 336 |
*buffer_size = (*buffer_size) - 2; |
| 337 |
} |
| 338 |
|
| 339 |
void |
| 340 |
qmi_utils_write_gint16_to_buffer (guint8 **buffer, |
| 341 |
guint16 *buffer_size, |
| 342 |
QmiEndian endian, |
| 343 |
gint16 *in) |
| 344 |
{ |
| 345 |
gint16 tmp; |
| 346 |
|
| 347 |
g_assert (in != NULL); |
| 348 |
g_assert (buffer != NULL); |
| 349 |
g_assert (buffer_size != NULL); |
| 350 |
g_assert (*buffer_size >= 2); |
| 351 |
|
| 352 |
if (endian == QMI_ENDIAN_BIG) |
| 353 |
tmp = GINT16_TO_BE (*in); |
| 354 |
else |
| 355 |
tmp = GINT16_TO_LE (*in); |
| 356 |
memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); |
| 357 |
|
| 358 |
*buffer = &((*buffer)[2]); |
| 359 |
*buffer_size = (*buffer_size) - 2; |
| 360 |
} |
| 361 |
|
| 362 |
void |
| 363 |
qmi_utils_write_guint32_to_buffer (guint8 **buffer, |
| 364 |
guint16 *buffer_size, |
| 365 |
QmiEndian endian, |
| 366 |
guint32 *in) |
| 367 |
{ |
| 368 |
guint32 tmp; |
| 369 |
|
| 370 |
g_assert (in != NULL); |
| 371 |
g_assert (buffer != NULL); |
| 372 |
g_assert (buffer_size != NULL); |
| 373 |
g_assert (*buffer_size >= 4); |
| 374 |
|
| 375 |
if (endian == QMI_ENDIAN_BIG) |
| 376 |
tmp = GUINT32_TO_BE (*in); |
| 377 |
else |
| 378 |
tmp = GUINT32_TO_LE (*in); |
| 379 |
memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); |
| 380 |
|
| 381 |
*buffer = &((*buffer)[4]); |
| 382 |
*buffer_size = (*buffer_size) - 4; |
| 383 |
} |
| 384 |
|
| 385 |
void |
| 386 |
qmi_utils_write_gint32_to_buffer (guint8 **buffer, |
| 387 |
guint16 *buffer_size, |
| 388 |
QmiEndian endian, |
| 389 |
gint32 *in) |
| 390 |
{ |
| 391 |
gint32 tmp; |
| 392 |
|
| 393 |
g_assert (in != NULL); |
| 394 |
g_assert (buffer != NULL); |
| 395 |
g_assert (buffer_size != NULL); |
| 396 |
g_assert (*buffer_size >= 4); |
| 397 |
|
| 398 |
if (endian == QMI_ENDIAN_BIG) |
| 399 |
tmp = GINT32_TO_BE (*in); |
| 400 |
else |
| 401 |
tmp = GINT32_TO_LE (*in); |
| 402 |
memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); |
| 403 |
|
| 404 |
*buffer = &((*buffer)[4]); |
| 405 |
*buffer_size = (*buffer_size) - 4; |
| 406 |
} |
| 407 |
|
| 408 |
void |
| 409 |
qmi_utils_write_guint64_to_buffer (guint8 **buffer, |
| 410 |
guint16 *buffer_size, |
| 411 |
QmiEndian endian, |
| 412 |
guint64 *in) |
| 413 |
{ |
| 414 |
guint64 tmp; |
| 415 |
|
| 416 |
g_assert (in != NULL); |
| 417 |
g_assert (buffer != NULL); |
| 418 |
g_assert (buffer_size != NULL); |
| 419 |
g_assert (*buffer_size >= 8); |
| 420 |
|
| 421 |
if (endian == QMI_ENDIAN_BIG) |
| 422 |
tmp = GUINT64_TO_BE (*in); |
| 423 |
else |
| 424 |
tmp = GUINT64_TO_LE (*in); |
| 425 |
memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); |
| 426 |
|
| 427 |
*buffer = &((*buffer)[8]); |
| 428 |
*buffer_size = (*buffer_size) - 8; |
| 429 |
} |
| 430 |
|
| 431 |
void |
| 432 |
qmi_utils_write_gint64_to_buffer (guint8 **buffer, |
| 433 |
guint16 *buffer_size, |
| 434 |
QmiEndian endian, |
| 435 |
gint64 *in) |
| 436 |
{ |
| 437 |
gint64 tmp; |
| 438 |
|
| 439 |
g_assert (in != NULL); |
| 440 |
g_assert (buffer != NULL); |
| 441 |
g_assert (buffer_size != NULL); |
| 442 |
g_assert (*buffer_size >= 8); |
| 443 |
|
| 444 |
if (endian == QMI_ENDIAN_BIG) |
| 445 |
tmp = GINT64_TO_BE (*in); |
| 446 |
else |
| 447 |
tmp = GINT64_TO_LE (*in); |
| 448 |
memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); |
| 449 |
|
| 450 |
*buffer = &((*buffer)[8]); |
| 451 |
*buffer_size = (*buffer_size) - 8; |
| 452 |
} |
| 453 |
|
| 454 |
void |
| 455 |
qmi_utils_write_sized_guint_to_buffer (guint8 **buffer, |
| 456 |
guint16 *buffer_size, |
| 457 |
guint n_bytes, |
| 458 |
QmiEndian endian, |
| 459 |
guint64 *in) |
| 460 |
{ |
| 461 |
guint64 tmp; |
| 462 |
|
| 463 |
g_assert (in != NULL); |
| 464 |
g_assert (buffer != NULL); |
| 465 |
g_assert (buffer_size != NULL); |
| 466 |
g_assert (*buffer_size >= n_bytes); |
| 467 |
g_assert (n_bytes <= 8); |
| 468 |
|
| 469 |
if (endian == QMI_ENDIAN_BIG) |
| 470 |
tmp = GUINT64_TO_BE (*in); |
| 471 |
else |
| 472 |
tmp = GUINT64_TO_LE (*in); |
| 473 |
|
| 474 |
/* In Little Endian, we read the bytes from the beginning of the buffer */ |
| 475 |
if (endian == QMI_ENDIAN_LITTLE) { |
| 476 |
memcpy (*buffer, &tmp, n_bytes); |
| 477 |
} |
| 478 |
/* In Big Endian, we read the bytes from the end of the buffer */ |
| 479 |
else { |
| 480 |
guint8 tmp_buffer[8]; |
| 481 |
|
| 482 |
memcpy (&tmp_buffer[0], &tmp, 8); |
| 483 |
memcpy (*buffer, &tmp_buffer[8 - n_bytes], n_bytes); |
| 484 |
} |
| 485 |
|
| 486 |
*buffer = &((*buffer)[n_bytes]); |
| 487 |
*buffer_size = (*buffer_size) - n_bytes; |
| 488 |
} |
| 489 |
|
| 490 |
void |
| 491 |
qmi_utils_read_string_from_buffer (const guint8 **buffer, |
| 492 |
guint16 *buffer_size, |
| 493 |
guint8 length_prefix_size, |
| 494 |
guint16 max_size, |
| 495 |
gchar **out) |
| 496 |
{ |
| 497 |
guint16 string_length; |
| 498 |
guint16 valid_string_length; |
| 499 |
guint8 string_length_8; |
| 500 |
guint16 string_length_16; |
| 501 |
|
| 502 |
g_assert (out != NULL); |
| 503 |
g_assert (buffer != NULL); |
| 504 |
g_assert (buffer_size != NULL); |
| 505 |
g_assert (length_prefix_size == 0 || |
| 506 |
length_prefix_size == 8 || |
| 507 |
length_prefix_size == 16); |
| 508 |
|
| 509 |
switch (length_prefix_size) { |
| 510 |
case 0: |
| 511 |
/* If no length prefix given, read the whole buffer into a string */ |
| 512 |
string_length = *buffer_size; |
| 513 |
break; |
| 514 |
case 8: |
| 515 |
qmi_utils_read_guint8_from_buffer (buffer, |
| 516 |
buffer_size, |
| 517 |
&string_length_8); |
| 518 |
string_length = string_length_8; |
| 519 |
break; |
| 520 |
case 16: |
| 521 |
qmi_utils_read_guint16_from_buffer (buffer, |
| 522 |
buffer_size, |
| 523 |
QMI_ENDIAN_LITTLE, |
| 524 |
&string_length_16); |
| 525 |
string_length = string_length_16; |
| 526 |
break; |
| 527 |
default: |
| 528 |
g_assert_not_reached (); |
| 529 |
} |
| 530 |
|
| 531 |
if (max_size > 0 && string_length > max_size) |
| 532 |
valid_string_length = max_size; |
| 533 |
else |
| 534 |
valid_string_length = string_length; |
| 535 |
|
| 536 |
/* Read 'valid_string_length' bytes */ |
| 537 |
*out = g_malloc (valid_string_length + 1); |
| 538 |
memcpy (*out, *buffer, valid_string_length); |
| 539 |
(*out)[valid_string_length] = '\0'; |
| 540 |
|
| 541 |
/* And walk 'string_length' bytes */ |
| 542 |
*buffer = &((*buffer)[string_length]); |
| 543 |
*buffer_size = (*buffer_size) - string_length; |
| 544 |
} |
| 545 |
|
| 546 |
void |
| 547 |
qmi_utils_read_fixed_size_string_from_buffer (const guint8 **buffer, |
| 548 |
guint16 *buffer_size, |
| 549 |
guint16 fixed_size, |
| 550 |
gchar *out) |
| 551 |
{ |
| 552 |
g_assert (out != NULL); |
| 553 |
g_assert (buffer != NULL); |
| 554 |
g_assert (buffer_size != NULL); |
| 555 |
g_assert (fixed_size > 0); |
| 556 |
|
| 557 |
memcpy (out, *buffer, fixed_size); |
| 558 |
|
| 559 |
*buffer = &((*buffer)[fixed_size]); |
| 560 |
*buffer_size = (*buffer_size) - fixed_size; |
| 561 |
} |
| 562 |
|
| 563 |
void |
| 564 |
qmi_utils_write_string_to_buffer (guint8 **buffer, |
| 565 |
guint16 *buffer_size, |
| 566 |
guint8 length_prefix_size, |
| 567 |
const gchar *in) |
| 568 |
{ |
| 569 |
gsize len; |
| 570 |
guint8 len_8; |
| 571 |
guint16 len_16; |
| 572 |
|
| 573 |
g_assert (in != NULL); |
| 574 |
g_assert (buffer != NULL); |
| 575 |
g_assert (buffer_size != NULL); |
| 576 |
g_assert (length_prefix_size == 0 || |
| 577 |
length_prefix_size == 8 || |
| 578 |
length_prefix_size == 16); |
| 579 |
|
| 580 |
len = strlen (in); |
| 581 |
|
| 582 |
g_assert ( len + (length_prefix_size/8) <= *buffer_size |
| 583 |
|| (length_prefix_size==8 && ((int) G_MAXUINT8 + 1) < *buffer_size)); |
| 584 |
|
| 585 |
switch (length_prefix_size) { |
| 586 |
case 0: |
| 587 |
break; |
| 588 |
case 8: |
| 589 |
if (len > G_MAXUINT8) { |
| 590 |
g_warn_if_reached (); |
| 591 |
len = G_MAXUINT8; |
| 592 |
} |
| 593 |
len_8 = (guint8)len; |
| 594 |
qmi_utils_write_guint8_to_buffer (buffer, |
| 595 |
buffer_size, |
| 596 |
&len_8); |
| 597 |
break; |
| 598 |
case 16: |
| 599 |
/* already asserted that @len is no larger then @buffer_size */ |
| 600 |
len_16 = (guint16)len; |
| 601 |
qmi_utils_write_guint16_to_buffer (buffer, |
| 602 |
buffer_size, |
| 603 |
QMI_ENDIAN_LITTLE, |
| 604 |
&len_16); |
| 605 |
break; |
| 606 |
default: |
| 607 |
g_assert_not_reached (); |
| 608 |
} |
| 609 |
|
| 610 |
memcpy (*buffer, in, len); |
| 611 |
*buffer = &((*buffer)[len]); |
| 612 |
*buffer_size = (*buffer_size) - len; |
| 613 |
} |
| 614 |
|
| 615 |
void |
| 616 |
qmi_utils_write_fixed_size_string_to_buffer (guint8 **buffer, |
| 617 |
guint16 *buffer_size, |
| 618 |
guint16 fixed_size, |
| 619 |
const gchar *in) |
| 620 |
{ |
| 621 |
g_assert (in != NULL); |
| 622 |
g_assert (buffer != NULL); |
| 623 |
g_assert (buffer_size != NULL); |
| 624 |
g_assert (fixed_size > 0); |
| 625 |
g_assert (fixed_size <= *buffer_size); |
| 626 |
|
| 627 |
memcpy (*buffer, in, fixed_size); |
| 628 |
*buffer = &((*buffer)[fixed_size]); |
| 629 |
*buffer_size = (*buffer_size) - fixed_size; |
| 630 |
} |
| 631 |
|
| 632 |
/*****************************************************************************/ |
| 633 |
|
| 634 |
gchar * |
| 635 |
qmi_message_get_printable (QmiMessage *self, |
| 636 |
const gchar *line_prefix) |
| 637 |
{ |
| 638 |
return qmi_message_get_printable_full (self, NULL, line_prefix); |
| 639 |
} |
| 640 |
|
| 641 |
gboolean |
| 642 |
qmi_message_get_version_introduced (QmiMessage *self, |
| 643 |
guint *major, |
| 644 |
guint *minor) |
| 645 |
{ |
| 646 |
return qmi_message_get_version_introduced_full (self, NULL, major, minor); |
| 647 |
} |
| 648 |
|
| 649 |
gboolean |
| 650 |
qmi_message_get_version_introduced_full (QmiMessage *self, |
| 651 |
QmiMessageContext *context, |
| 652 |
guint *major, |
| 653 |
guint *minor) |
| 654 |
{ |
| 655 |
/* We keep the method just avoid breaking API, but this is really no longer |
| 656 |
* usable */ |
| 657 |
return FALSE; |
| 658 |
} |
| 659 |
|
| 660 |
gboolean |
| 661 |
qmi_message_tlv_read_gfloat (QmiMessage *self, |
| 662 |
gsize tlv_offset, |
| 663 |
gsize *offset, |
| 664 |
gfloat *out, |
| 665 |
GError **error) |
| 666 |
{ |
| 667 |
return qmi_message_tlv_read_gfloat_endian (self, tlv_offset, offset, QMI_ENDIAN_HOST, out, error); |
| 668 |
} |
| 669 |
|
| 670 |
/*****************************************************************************/ |
| 671 |
|
| 672 |
gboolean |
| 673 |
qmi_device_close (QmiDevice *self, |
| 674 |
GError **error) |
| 675 |
{ |
| 676 |
g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); |
| 677 |
qmi_device_close_async (self, 0, NULL, NULL, NULL); |
| 678 |
return TRUE; |
| 679 |
} |
| 680 |
|
| 681 |
QmiMessage * |
| 682 |
qmi_device_command_finish (QmiDevice *self, |
| 683 |
GAsyncResult *res, |
| 684 |
GError **error) |
| 685 |
{ |
| 686 |
return qmi_device_command_full_finish (self, res, error); |
| 687 |
} |
| 688 |
|
| 689 |
void |
| 690 |
qmi_device_command (QmiDevice *self, |
| 691 |
QmiMessage *message, |
| 692 |
guint timeout, |
| 693 |
GCancellable *cancellable, |
| 694 |
GAsyncReadyCallback callback, |
| 695 |
gpointer user_data) |
| 696 |
{ |
| 697 |
qmi_device_command_full (self, message, NULL, timeout, cancellable, callback, user_data); |
| 698 |
} |
| 699 |
|
| 700 |
/*****************************************************************************/ |
| 701 |
|
| 702 |
#if defined HAVE_QMI_MESSAGE_DMS_SET_SERVICE_PROGRAMMING_CODE |
| 703 |
|
| 704 |
gboolean |
| 705 |
qmi_message_dms_set_service_programming_code_input_get_new ( |
| 706 |
QmiMessageDmsSetServiceProgrammingCodeInput *self, |
| 707 |
const gchar **arg_new, |
| 708 |
GError **error) |
| 709 |
{ |
| 710 |
return qmi_message_dms_set_service_programming_code_input_get_new_code (self, arg_new, error); |
| 711 |
} |
| 712 |
|
| 713 |
gboolean |
| 714 |
qmi_message_dms_set_service_programming_code_input_set_new ( |
| 715 |
QmiMessageDmsSetServiceProgrammingCodeInput *self, |
| 716 |
const gchar *arg_new, |
| 717 |
GError **error) |
| 718 |
{ |
| 719 |
return qmi_message_dms_set_service_programming_code_input_set_new_code (self, arg_new, error); |
| 720 |
} |
| 721 |
|
| 722 |
gboolean |
| 723 |
qmi_message_dms_set_service_programming_code_input_get_current ( |
| 724 |
QmiMessageDmsSetServiceProgrammingCodeInput *self, |
| 725 |
const gchar **arg_current, |
| 726 |
GError **error) |
| 727 |
{ |
| 728 |
return qmi_message_dms_set_service_programming_code_input_get_current_code (self, arg_current, error); |
| 729 |
} |
| 730 |
|
| 731 |
gboolean |
| 732 |
qmi_message_dms_set_service_programming_code_input_set_current ( |
| 733 |
QmiMessageDmsSetServiceProgrammingCodeInput *self, |
| 734 |
const gchar *arg_current, |
| 735 |
GError **error) |
| 736 |
{ |
| 737 |
return qmi_message_dms_set_service_programming_code_input_set_current_code (self, arg_current, error); |
| 738 |
} |
| 739 |
|
| 740 |
#endif /* HAVE_QMI_MESSAGE_DMS_SET_SERVICE_PROGRAMMING_CODE */ |
| 741 |
|
| 742 |
/*****************************************************************************/ |
| 743 |
|
| 744 |
#define SESSION_INFORMATION_DEPRECATED_METHOD(BUNDLE_SUBSTR,METHOD_SUBSTR) \ |
| 745 |
gboolean \ |
| 746 |
qmi_message_uim_##METHOD_SUBSTR##_input_get_session_information ( \ |
| 747 |
QmiMessageUim##BUNDLE_SUBSTR##Input *self, \ |
| 748 |
QmiUimSessionType *value_session_session_type, \ |
| 749 |
const gchar **value_session_information_application_identifier, \ |
| 750 |
GError **error) \ |
| 751 |
{ \ |
| 752 |
/* just ignore the output string */ \ |
| 753 |
return qmi_message_uim_##METHOD_SUBSTR##_input_get_session (self, \ |
| 754 |
value_session_session_type, \ |
| 755 |
NULL, \ |
| 756 |
error); \ |
| 757 |
} \ |
| 758 |
gboolean \ |
| 759 |
qmi_message_uim_##METHOD_SUBSTR##_input_set_session_information ( \ |
| 760 |
QmiMessageUim##BUNDLE_SUBSTR##Input *self, \ |
| 761 |
QmiUimSessionType value_session_information_session_type, \ |
| 762 |
const gchar *value_session_information_application_identifier, \ |
| 763 |
GError **error) \ |
| 764 |
{ \ |
| 765 |
GArray *array; \ |
| 766 |
gboolean ret; \ |
| 767 |
\ |
| 768 |
array = g_array_append_vals (g_array_new (FALSE, FALSE, sizeof (guint8)), \ |
| 769 |
value_session_information_application_identifier, \ |
| 770 |
strlen (value_session_information_application_identifier)); \ |
| 771 |
ret = qmi_message_uim_##METHOD_SUBSTR##_input_set_session (self, \ |
| 772 |
value_session_information_session_type, \ |
| 773 |
array, \ |
| 774 |
error); \ |
| 775 |
g_array_unref (array); \ |
| 776 |
return ret; \ |
| 777 |
} |
| 778 |
|
| 779 |
#if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT |
| 780 |
SESSION_INFORMATION_DEPRECATED_METHOD (ReadTransparent, read_transparent) |
| 781 |
#endif |
| 782 |
#if defined HAVE_QMI_MESSAGE_UIM_READ_RECORD |
| 783 |
SESSION_INFORMATION_DEPRECATED_METHOD (ReadRecord, read_record) |
| 784 |
#endif |
| 785 |
#if defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES |
| 786 |
SESSION_INFORMATION_DEPRECATED_METHOD (GetFileAttributes, get_file_attributes) |
| 787 |
#endif |
| 788 |
#if defined HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION |
| 789 |
SESSION_INFORMATION_DEPRECATED_METHOD (SetPinProtection, set_pin_protection) |
| 790 |
#endif |
| 791 |
#if defined HAVE_QMI_MESSAGE_UIM_VERIFY_PIN |
| 792 |
SESSION_INFORMATION_DEPRECATED_METHOD (VerifyPin, verify_pin) |
| 793 |
#endif |
| 794 |
#if defined HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN |
| 795 |
SESSION_INFORMATION_DEPRECATED_METHOD (UnblockPin, unblock_pin) |
| 796 |
#endif |
| 797 |
#if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PIN |
| 798 |
SESSION_INFORMATION_DEPRECATED_METHOD (ChangePin, change_pin) |
| 799 |
#endif |
| 800 |
|
| 801 |
/*****************************************************************************/ |
| 802 |
|
| 803 |
GType |
| 804 |
qmi_dms_dell_firmware_version_type_get_type (void) |
| 805 |
{ |
| 806 |
return qmi_dms_foxconn_firmware_version_type_get_type (); |
| 807 |
} |
| 808 |
|
| 809 |
const gchar * |
| 810 |
qmi_dms_dell_firmware_version_type_get_string (QmiDeprecatedDmsDellFirmwareVersionType val) |
| 811 |
{ |
| 812 |
return qmi_dms_foxconn_firmware_version_type_get_string ((QmiDmsFoxconnFirmwareVersionType) val); |
| 813 |
} |
| 814 |
|
| 815 |
#if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION |
| 816 |
|
| 817 |
GType |
| 818 |
qmi_message_dms_dell_get_firmware_version_output_get_type (void) |
| 819 |
{ |
| 820 |
return qmi_message_dms_foxconn_get_firmware_version_output_get_type (); |
| 821 |
} |
| 822 |
|
| 823 |
gboolean |
| 824 |
qmi_message_dms_dell_get_firmware_version_output_get_version ( |
| 825 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self, |
| 826 |
const gchar **value_version, |
| 827 |
GError **error) |
| 828 |
{ |
| 829 |
return qmi_message_dms_foxconn_get_firmware_version_output_get_version (self, value_version, error); |
| 830 |
} |
| 831 |
|
| 832 |
gboolean |
| 833 |
qmi_message_dms_dell_get_firmware_version_output_get_result ( |
| 834 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self, |
| 835 |
GError **error) |
| 836 |
{ |
| 837 |
return qmi_message_dms_foxconn_get_firmware_version_output_get_result (self, error); |
| 838 |
} |
| 839 |
|
| 840 |
GType |
| 841 |
qmi_message_dms_dell_get_firmware_version_input_get_type (void) |
| 842 |
{ |
| 843 |
return qmi_message_dms_foxconn_get_firmware_version_input_get_type (); |
| 844 |
} |
| 845 |
|
| 846 |
gboolean |
| 847 |
qmi_message_dms_dell_get_firmware_version_input_get_version_type ( |
| 848 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self, |
| 849 |
QmiDeprecatedDmsDellFirmwareVersionType *value_version_type, |
| 850 |
GError **error) |
| 851 |
{ |
| 852 |
return qmi_message_dms_foxconn_get_firmware_version_input_get_version_type (self, (QmiDmsFoxconnFirmwareVersionType *)value_version_type, error); |
| 853 |
} |
| 854 |
|
| 855 |
gboolean |
| 856 |
qmi_message_dms_dell_get_firmware_version_input_set_version_type ( |
| 857 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self, |
| 858 |
QmiDeprecatedDmsDellFirmwareVersionType value_version_type, |
| 859 |
GError **error) |
| 860 |
{ |
| 861 |
return qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (self, (QmiDmsFoxconnFirmwareVersionType)value_version_type, error); |
| 862 |
} |
| 863 |
|
| 864 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionInput * |
| 865 |
qmi_message_dms_dell_get_firmware_version_input_ref (QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self) |
| 866 |
{ |
| 867 |
return qmi_message_dms_foxconn_get_firmware_version_input_ref (self); |
| 868 |
} |
| 869 |
|
| 870 |
void |
| 871 |
qmi_message_dms_dell_get_firmware_version_input_unref (QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self) |
| 872 |
{ |
| 873 |
qmi_message_dms_foxconn_get_firmware_version_input_unref (self); |
| 874 |
} |
| 875 |
|
| 876 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionInput * |
| 877 |
qmi_message_dms_dell_get_firmware_version_input_new (void) |
| 878 |
{ |
| 879 |
return qmi_message_dms_foxconn_get_firmware_version_input_new (); |
| 880 |
} |
| 881 |
|
| 882 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput * |
| 883 |
qmi_message_dms_dell_get_firmware_version_output_ref (QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self) |
| 884 |
{ |
| 885 |
return qmi_message_dms_foxconn_get_firmware_version_output_ref (self); |
| 886 |
} |
| 887 |
|
| 888 |
void |
| 889 |
qmi_message_dms_dell_get_firmware_version_output_unref (QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self) |
| 890 |
{ |
| 891 |
qmi_message_dms_foxconn_get_firmware_version_output_unref (self); |
| 892 |
} |
| 893 |
|
| 894 |
void |
| 895 |
qmi_client_dms_dell_get_firmware_version ( |
| 896 |
QmiClientDms *self, |
| 897 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *input, |
| 898 |
guint timeout, |
| 899 |
GCancellable *cancellable, |
| 900 |
GAsyncReadyCallback callback, |
| 901 |
gpointer user_data) |
| 902 |
{ |
| 903 |
qmi_client_dms_foxconn_get_firmware_version (self, input, timeout, cancellable, callback, user_data); |
| 904 |
} |
| 905 |
|
| 906 |
QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput * |
| 907 |
qmi_client_dms_dell_get_firmware_version_finish ( |
| 908 |
QmiClientDms *self, |
| 909 |
GAsyncResult *res, |
| 910 |
GError **error) |
| 911 |
{ |
| 912 |
return qmi_client_dms_foxconn_get_firmware_version_finish (self, res, error); |
| 913 |
} |
| 914 |
|
| 915 |
#endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION */ |
| 916 |
|
| 917 |
/*****************************************************************************/ |
| 918 |
|
| 919 |
GType |
| 920 |
qmi_dms_dell_device_mode_get_type (void) |
| 921 |
{ |
| 922 |
return qmi_dms_foxconn_device_mode_get_type (); |
| 923 |
} |
| 924 |
|
| 925 |
const gchar * |
| 926 |
qmi_dms_dell_device_mode_get_string (QmiDeprecatedDmsDellDeviceMode val) |
| 927 |
{ |
| 928 |
return qmi_dms_foxconn_device_mode_get_string ((QmiDmsFoxconnDeviceMode) val); |
| 929 |
} |
| 930 |
|
| 931 |
#if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE |
| 932 |
|
| 933 |
GType |
| 934 |
qmi_message_dms_dell_change_device_mode_input_get_type (void) |
| 935 |
{ |
| 936 |
return qmi_message_dms_foxconn_change_device_mode_input_get_type (); |
| 937 |
} |
| 938 |
|
| 939 |
gboolean |
| 940 |
qmi_message_dms_dell_change_device_mode_input_get_mode ( |
| 941 |
QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self, |
| 942 |
QmiDeprecatedDmsDellDeviceMode *value_mode, |
| 943 |
GError **error) |
| 944 |
{ |
| 945 |
return qmi_message_dms_foxconn_change_device_mode_input_get_mode (self, (QmiDmsFoxconnDeviceMode *) value_mode, error); |
| 946 |
} |
| 947 |
|
| 948 |
gboolean |
| 949 |
qmi_message_dms_dell_change_device_mode_input_set_mode ( |
| 950 |
QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self, |
| 951 |
QmiDeprecatedDmsDellDeviceMode value_mode, |
| 952 |
GError **error) |
| 953 |
{ |
| 954 |
return qmi_message_dms_foxconn_change_device_mode_input_set_mode (self, (QmiDmsFoxconnDeviceMode) value_mode, error); |
| 955 |
} |
| 956 |
|
| 957 |
QmiDeprecatedMessageDmsDellChangeDeviceModeInput * |
| 958 |
qmi_message_dms_dell_change_device_mode_input_ref (QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self) |
| 959 |
{ |
| 960 |
return qmi_message_dms_foxconn_change_device_mode_input_ref (self); |
| 961 |
} |
| 962 |
|
| 963 |
void |
| 964 |
qmi_message_dms_dell_change_device_mode_input_unref (QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self) |
| 965 |
{ |
| 966 |
qmi_message_dms_foxconn_change_device_mode_input_unref (self); |
| 967 |
} |
| 968 |
|
| 969 |
QmiDeprecatedMessageDmsDellChangeDeviceModeInput * |
| 970 |
qmi_message_dms_dell_change_device_mode_input_new (void) |
| 971 |
{ |
| 972 |
return qmi_message_dms_foxconn_change_device_mode_input_new (); |
| 973 |
} |
| 974 |
|
| 975 |
GType |
| 976 |
qmi_message_dms_dell_change_device_mode_output_get_type (void) |
| 977 |
{ |
| 978 |
return qmi_message_dms_foxconn_change_device_mode_output_get_type (); |
| 979 |
} |
| 980 |
|
| 981 |
gboolean |
| 982 |
qmi_message_dms_dell_change_device_mode_output_get_result ( |
| 983 |
QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self, |
| 984 |
GError **error) |
| 985 |
{ |
| 986 |
return qmi_message_dms_foxconn_change_device_mode_output_get_result (self, error); |
| 987 |
} |
| 988 |
|
| 989 |
QmiDeprecatedMessageDmsDellChangeDeviceModeOutput * |
| 990 |
qmi_message_dms_dell_change_device_mode_output_ref (QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self) |
| 991 |
{ |
| 992 |
return qmi_message_dms_foxconn_change_device_mode_output_ref (self); |
| 993 |
} |
| 994 |
|
| 995 |
void |
| 996 |
qmi_message_dms_dell_change_device_mode_output_unref (QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self) |
| 997 |
{ |
| 998 |
qmi_message_dms_foxconn_change_device_mode_output_unref (self); |
| 999 |
} |
| 1000 |
|
| 1001 |
void |
| 1002 |
qmi_client_dms_dell_change_device_mode ( |
| 1003 |
QmiClientDms *self, |
| 1004 |
QmiDeprecatedMessageDmsDellChangeDeviceModeInput *input, |
| 1005 |
guint timeout, |
| 1006 |
GCancellable *cancellable, |
| 1007 |
GAsyncReadyCallback callback, |
| 1008 |
gpointer user_data) |
| 1009 |
{ |
| 1010 |
qmi_client_dms_foxconn_change_device_mode (self, input, timeout, cancellable, callback, user_data); |
| 1011 |
} |
| 1012 |
|
| 1013 |
QmiDeprecatedMessageDmsDellChangeDeviceModeOutput * |
| 1014 |
qmi_client_dms_dell_change_device_mode_finish ( |
| 1015 |
QmiClientDms *self, |
| 1016 |
GAsyncResult *res, |
| 1017 |
GError **error) |
| 1018 |
{ |
| 1019 |
return qmi_client_dms_foxconn_change_device_mode_finish (self, res, error); |
| 1020 |
} |
| 1021 |
|
| 1022 |
#endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE */ |
| 1023 |
|
| 1024 |
/*****************************************************************************/ |
| 1025 |
|
| 1026 |
#if defined HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME |
| 1027 |
|
| 1028 |
gboolean |
| 1029 |
qmi_message_nas_get_operator_name_output_get_operator_nitz_information ( |
| 1030 |
QmiMessageNasGetOperatorNameOutput *self, |
| 1031 |
QmiNasPlmnEncodingScheme *value_operator_nitz_information_name_encoding, |
| 1032 |
QmiNasPlmnNameCountryInitials *value_operator_nitz_information_short_country_initials, |
| 1033 |
QmiNasPlmnNameSpareBits *value_operator_nitz_information_long_name_spare_bits, |
| 1034 |
QmiNasPlmnNameSpareBits *value_operator_nitz_information_short_name_spare_bits, |
| 1035 |
const gchar **value_operator_nitz_information_long_name, |
| 1036 |
const gchar **value_operator_nitz_information_short_name, |
| 1037 |
GError **error) |
| 1038 |
{ |
| 1039 |
GArray *long_name = NULL; |
| 1040 |
GArray *short_name = NULL; |
| 1041 |
|
| 1042 |
if (!qmi_message_nas_get_operator_name_output_get_nitz_information ( |
| 1043 |
self, |
| 1044 |
value_operator_nitz_information_name_encoding, |
| 1045 |
value_operator_nitz_information_short_country_initials, |
| 1046 |
value_operator_nitz_information_long_name_spare_bits, |
| 1047 |
value_operator_nitz_information_short_name_spare_bits, |
| 1048 |
&long_name, |
| 1049 |
&short_name, |
| 1050 |
error)) |
| 1051 |
return FALSE; |
| 1052 |
|
| 1053 |
if (value_operator_nitz_information_long_name) |
| 1054 |
*value_operator_nitz_information_long_name = (const gchar *)long_name->data; |
| 1055 |
if (value_operator_nitz_information_short_name) |
| 1056 |
*value_operator_nitz_information_short_name = (const gchar *)short_name->data; |
| 1057 |
return TRUE; |
| 1058 |
} |
| 1059 |
|
| 1060 |
#endif /* HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME */ |
| 1061 |
|
| 1062 |
#if defined HAVE_QMI_INDICATION_NAS_OPERATOR_NAME |
| 1063 |
|
| 1064 |
gboolean |
| 1065 |
qmi_indication_nas_operator_name_output_get_operator_nitz_information ( |
| 1066 |
QmiIndicationNasOperatorNameOutput *self, |
| 1067 |
QmiNasPlmnEncodingScheme *value_operator_nitz_information_name_encoding, |
| 1068 |
QmiNasPlmnNameCountryInitials *value_operator_nitz_information_short_country_initials, |
| 1069 |
QmiNasPlmnNameSpareBits *value_operator_nitz_information_long_name_spare_bits, |
| 1070 |
QmiNasPlmnNameSpareBits *value_operator_nitz_information_short_name_spare_bits, |
| 1071 |
const gchar **value_operator_nitz_information_long_name, |
| 1072 |
const gchar **value_operator_nitz_information_short_name, |
| 1073 |
GError **error) |
| 1074 |
{ |
| 1075 |
GArray *long_name = NULL; |
| 1076 |
GArray *short_name = NULL; |
| 1077 |
|
| 1078 |
if (!qmi_indication_nas_operator_name_output_get_nitz_information ( |
| 1079 |
self, |
| 1080 |
value_operator_nitz_information_name_encoding, |
| 1081 |
value_operator_nitz_information_short_country_initials, |
| 1082 |
value_operator_nitz_information_long_name_spare_bits, |
| 1083 |
value_operator_nitz_information_short_name_spare_bits, |
| 1084 |
&long_name, |
| 1085 |
&short_name, |
| 1086 |
error)) |
| 1087 |
return FALSE; |
| 1088 |
|
| 1089 |
if (value_operator_nitz_information_long_name) |
| 1090 |
*value_operator_nitz_information_long_name = (const gchar *)long_name->data; |
| 1091 |
if (value_operator_nitz_information_short_name) |
| 1092 |
*value_operator_nitz_information_short_name = (const gchar *)short_name->data; |
| 1093 |
return TRUE; |
| 1094 |
} |
| 1095 |
|
| 1096 |
#endif /* HAVE_QMI_INDICATION_NAS_OPERATOR_NAME */ |
| 1097 |
|
| 1098 |
/*****************************************************************************/ |
| 1099 |
|
| 1100 |
#if defined HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK |
| 1101 |
|
| 1102 |
gboolean |
| 1103 |
qmi_message_nas_get_home_network_output_get_home_network_3gpp2 ( |
| 1104 |
QmiMessageNasGetHomeNetworkOutput *self, |
| 1105 |
guint16 *value_home_network_3gpp2_mcc, |
| 1106 |
guint16 *value_home_network_3gpp2_mnc, |
| 1107 |
QmiNasNetworkDescriptionDisplay *value_home_network_3gpp2_display_description, |
| 1108 |
QmiNasNetworkDescriptionEncoding *value_home_network_3gpp2_description_encoding, |
| 1109 |
const gchar **value_home_network_3gpp2_description, |
| 1110 |
GError **error) |
| 1111 |
{ |
| 1112 |
GArray *description = NULL; |
| 1113 |
|
| 1114 |
if (!qmi_message_nas_get_home_network_output_get_home_network_3gpp2_ext ( |
| 1115 |
self, |
| 1116 |
value_home_network_3gpp2_mcc, |
| 1117 |
value_home_network_3gpp2_mnc, |
| 1118 |
value_home_network_3gpp2_display_description, |
| 1119 |
value_home_network_3gpp2_description_encoding, |
| 1120 |
&description, |
| 1121 |
error)) |
| 1122 |
return FALSE; |
| 1123 |
|
| 1124 |
if (value_home_network_3gpp2_description) |
| 1125 |
*value_home_network_3gpp2_description = (const gchar *)description->data; |
| 1126 |
|
| 1127 |
return TRUE; |
| 1128 |
} |
| 1129 |
|
| 1130 |
#endif /* HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK */ |
| 1131 |
|
| 1132 |
#if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO |
| 1133 |
|
| 1134 |
typedef struct { |
| 1135 |
GArray *geran_info_cell; |
| 1136 |
} MessageNasGetCellLocationInfoOutputCompatContext; |
| 1137 |
|
| 1138 |
static void |
| 1139 |
message_nas_get_cell_location_info_output_compat_context_free (MessageNasGetCellLocationInfoOutputCompatContext *ctx) |
| 1140 |
{ |
| 1141 |
if (ctx->geran_info_cell) |
| 1142 |
g_array_unref (ctx->geran_info_cell); |
| 1143 |
g_slice_free (MessageNasGetCellLocationInfoOutputCompatContext, ctx); |
| 1144 |
} |
| 1145 |
|
| 1146 |
static MessageNasGetCellLocationInfoOutputCompatContext * |
| 1147 |
message_nas_get_cell_location_info_output_get_compat_context (QmiMessageNasGetCellLocationInfoOutput *self) |
| 1148 |
{ |
| 1149 |
MessageNasGetCellLocationInfoOutputCompatContext *ctx; |
| 1150 |
|
| 1151 |
ctx = qmi_message_nas_get_cell_location_info_output_get_compat_context (self); |
| 1152 |
if (!ctx) { |
| 1153 |
ctx = g_slice_new0 (MessageNasGetCellLocationInfoOutputCompatContext); |
| 1154 |
qmi_message_nas_get_cell_location_info_output_set_compat_context (self, ctx, (GDestroyNotify)message_nas_get_cell_location_info_output_compat_context_free); |
| 1155 |
} |
| 1156 |
|
| 1157 |
return ctx; |
| 1158 |
} |
| 1159 |
|
| 1160 |
/* This PLMN string is returned because it's a 3-char long valid UTF-8. */ |
| 1161 |
static const gchar invalid_plmn_str[] = " "; |
| 1162 |
|
| 1163 |
gboolean |
| 1164 |
qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info ( |
| 1165 |
QmiMessageNasGetCellLocationInfoOutput *self, |
| 1166 |
gboolean *value_intrafrequency_lte_info_ue_in_idle, |
| 1167 |
const gchar **value_intrafrequency_lte_info_plmn, |
| 1168 |
guint16 *value_intrafrequency_lte_info_tracking_area_code, |
| 1169 |
guint32 *value_intrafrequency_lte_info_global_cell_id, |
| 1170 |
guint16 *value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, |
| 1171 |
guint16 *value_intrafrequency_lte_info_serving_cell_id, |
| 1172 |
guint8 *value_intrafrequency_lte_info_cell_reselection_priority, |
| 1173 |
guint8 *value_intrafrequency_lte_info_s_non_intra_search_threshold, |
| 1174 |
guint8 *value_intrafrequency_lte_info_serving_cell_low_threshold, |
| 1175 |
guint8 *value_intrafrequency_lte_info_s_intra_search_threshold, |
| 1176 |
GArray **value_intrafrequency_lte_info_cell, |
| 1177 |
GError **error) |
| 1178 |
{ |
| 1179 |
if (!qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2 ( |
| 1180 |
self, |
| 1181 |
value_intrafrequency_lte_info_ue_in_idle, |
| 1182 |
NULL, |
| 1183 |
value_intrafrequency_lte_info_tracking_area_code, |
| 1184 |
value_intrafrequency_lte_info_global_cell_id, |
| 1185 |
value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, |
| 1186 |
value_intrafrequency_lte_info_serving_cell_id, |
| 1187 |
value_intrafrequency_lte_info_cell_reselection_priority, |
| 1188 |
value_intrafrequency_lte_info_s_non_intra_search_threshold, |
| 1189 |
value_intrafrequency_lte_info_serving_cell_low_threshold, |
| 1190 |
value_intrafrequency_lte_info_s_intra_search_threshold, |
| 1191 |
value_intrafrequency_lte_info_cell, |
| 1192 |
error)) |
| 1193 |
return FALSE; |
| 1194 |
|
| 1195 |
if (value_intrafrequency_lte_info_plmn) |
| 1196 |
*value_intrafrequency_lte_info_plmn = invalid_plmn_str; |
| 1197 |
return TRUE; |
| 1198 |
} |
| 1199 |
|
| 1200 |
gboolean |
| 1201 |
qmi_message_nas_get_cell_location_info_output_get_umts_info ( |
| 1202 |
QmiMessageNasGetCellLocationInfoOutput *self, |
| 1203 |
guint16 *value_umts_info_cell_id, |
| 1204 |
const gchar **value_umts_info_plmn, |
| 1205 |
guint16 *value_umts_info_lac, |
| 1206 |
guint16 *value_umts_info_utra_absolute_rf_channel_number, |
| 1207 |
guint16 *value_umts_info_primary_scrambling_code, |
| 1208 |
gint16 *value_umts_info_rscp, |
| 1209 |
gint16 *value_umts_info_ecio, |
| 1210 |
GArray **value_umts_info_cell, |
| 1211 |
GArray **value_umts_info_neighboring_geran, |
| 1212 |
GError **error) |
| 1213 |
{ |
| 1214 |
if (!qmi_message_nas_get_cell_location_info_output_get_umts_info_v2 ( |
| 1215 |
self, |
| 1216 |
value_umts_info_cell_id, |
| 1217 |
NULL, |
| 1218 |
value_umts_info_lac, |
| 1219 |
value_umts_info_utra_absolute_rf_channel_number, |
| 1220 |
value_umts_info_primary_scrambling_code, |
| 1221 |
value_umts_info_rscp, |
| 1222 |
value_umts_info_ecio, |
| 1223 |
value_umts_info_cell, |
| 1224 |
value_umts_info_neighboring_geran, |
| 1225 |
error)) |
| 1226 |
return FALSE; |
| 1227 |
|
| 1228 |
if (value_umts_info_plmn) |
| 1229 |
*value_umts_info_plmn = invalid_plmn_str; |
| 1230 |
return TRUE; |
| 1231 |
} |
| 1232 |
|
| 1233 |
gboolean |
| 1234 |
qmi_message_nas_get_cell_location_info_output_get_geran_info ( |
| 1235 |
QmiMessageNasGetCellLocationInfoOutput *self, |
| 1236 |
guint32 *value_geran_info_cell_id, |
| 1237 |
const gchar **value_geran_info_plmn, |
| 1238 |
guint16 *value_geran_info_lac, |
| 1239 |
guint16 *value_geran_info_geran_absolute_rf_channel_number, |
| 1240 |
guint8 *value_geran_info_base_station_identity_code, |
| 1241 |
guint32 *value_geran_info_timing_advance, |
| 1242 |
guint16 *value_geran_info_rx_level, |
| 1243 |
GArray **value_geran_info_cell, |
| 1244 |
GError **error) |
| 1245 |
{ |
| 1246 |
GArray *geran_info_v2_cell = NULL; |
| 1247 |
|
| 1248 |
if (!qmi_message_nas_get_cell_location_info_output_get_geran_info_v2 ( |
| 1249 |
self, |
| 1250 |
value_geran_info_cell_id, |
| 1251 |
NULL, |
| 1252 |
value_geran_info_lac, |
| 1253 |
value_geran_info_geran_absolute_rf_channel_number, |
| 1254 |
value_geran_info_base_station_identity_code, |
| 1255 |
value_geran_info_timing_advance, |
| 1256 |
value_geran_info_rx_level, |
| 1257 |
&geran_info_v2_cell, |
| 1258 |
error)) |
| 1259 |
return FALSE; |
| 1260 |
|
| 1261 |
if (value_geran_info_plmn) |
| 1262 |
*value_geran_info_plmn = invalid_plmn_str; |
| 1263 |
|
| 1264 |
if (value_geran_info_cell) { |
| 1265 |
MessageNasGetCellLocationInfoOutputCompatContext *ctx; |
| 1266 |
|
| 1267 |
/* We have an array of QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement elements, |
| 1268 |
* we need to return an array of QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement elements |
| 1269 |
* instead. |
| 1270 |
*/ |
| 1271 |
ctx = message_nas_get_cell_location_info_output_get_compat_context (self); |
| 1272 |
if (!ctx->geran_info_cell) { |
| 1273 |
guint i; |
| 1274 |
|
| 1275 |
ctx->geran_info_cell = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement), geran_info_v2_cell->len); |
| 1276 |
for (i = 0; i < geran_info_v2_cell->len; i++) { |
| 1277 |
QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement *elemv2; |
| 1278 |
QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement elem; |
| 1279 |
|
| 1280 |
elemv2 = &g_array_index (geran_info_v2_cell, QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement, i); |
| 1281 |
elem.cell_id = elemv2->cell_id; |
| 1282 |
elem.plmn = (gchar *)invalid_plmn_str; |
| 1283 |
elem.lac = elemv2->lac; |
| 1284 |
elem.geran_absolute_rf_channel_number = elemv2->geran_absolute_rf_channel_number; |
| 1285 |
elem.base_station_identity_code = elemv2->base_station_identity_code; |
| 1286 |
elem.rx_level = elemv2->rx_level; |
| 1287 |
g_array_append_val (ctx->geran_info_cell, elem); |
| 1288 |
} |
| 1289 |
} |
| 1290 |
*value_geran_info_cell = ctx->geran_info_cell; |
| 1291 |
} |
| 1292 |
return TRUE; |
| 1293 |
} |
| 1294 |
|
| 1295 |
#endif /* HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO */ |
| 1296 |
|
| 1297 |
#if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER |
| 1298 |
|
| 1299 |
GType |
| 1300 |
qmi_message_wds_get_default_profile_num_input_get_type (void) |
| 1301 |
{ |
| 1302 |
return qmi_message_wds_get_default_profile_number_input_get_type (); |
| 1303 |
} |
| 1304 |
|
| 1305 |
gboolean |
| 1306 |
qmi_message_wds_get_default_profile_num_input_get_profile_type ( |
| 1307 |
QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self, |
| 1308 |
QmiWdsProfileType *value_profile_type_profile_type, |
| 1309 |
QmiWdsProfileFamily *value_profile_type_profile_family, |
| 1310 |
GError **error) |
| 1311 |
{ |
| 1312 |
return qmi_message_wds_get_default_profile_number_input_get_profile_type (self, |
| 1313 |
value_profile_type_profile_type, |
| 1314 |
value_profile_type_profile_family, |
| 1315 |
error); |
| 1316 |
} |
| 1317 |
|
| 1318 |
gboolean |
| 1319 |
qmi_message_wds_get_default_profile_num_input_set_profile_type ( |
| 1320 |
QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self, |
| 1321 |
QmiWdsProfileType value_profile_type_profile_type, |
| 1322 |
QmiWdsProfileFamily value_profile_type_profile_family, |
| 1323 |
GError **error) |
| 1324 |
{ |
| 1325 |
return qmi_message_wds_get_default_profile_number_input_set_profile_type (self, |
| 1326 |
value_profile_type_profile_type, |
| 1327 |
value_profile_type_profile_family, |
| 1328 |
error); |
| 1329 |
} |
| 1330 |
|
| 1331 |
QmiDeprecatedMessageWdsGetDefaultProfileNumInput * |
| 1332 |
qmi_message_wds_get_default_profile_num_input_ref (QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self) |
| 1333 |
{ |
| 1334 |
return qmi_message_wds_get_default_profile_number_input_ref (self); |
| 1335 |
} |
| 1336 |
|
| 1337 |
void |
| 1338 |
qmi_message_wds_get_default_profile_num_input_unref (QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self) |
| 1339 |
{ |
| 1340 |
qmi_message_wds_get_default_profile_number_input_unref (self); |
| 1341 |
} |
| 1342 |
|
| 1343 |
QmiDeprecatedMessageWdsGetDefaultProfileNumInput * |
| 1344 |
qmi_message_wds_get_default_profile_num_input_new (void) |
| 1345 |
{ |
| 1346 |
return qmi_message_wds_get_default_profile_number_input_new (); |
| 1347 |
} |
| 1348 |
|
| 1349 |
GType |
| 1350 |
qmi_message_wds_get_default_profile_num_output_get_type (void) |
| 1351 |
{ |
| 1352 |
return qmi_message_wds_get_default_profile_number_output_get_type (); |
| 1353 |
} |
| 1354 |
|
| 1355 |
gboolean |
| 1356 |
qmi_message_wds_get_default_profile_num_output_get_result ( |
| 1357 |
QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, |
| 1358 |
GError **error) |
| 1359 |
{ |
| 1360 |
return qmi_message_wds_get_default_profile_number_output_get_result (self, error); |
| 1361 |
} |
| 1362 |
|
| 1363 |
gboolean |
| 1364 |
qmi_message_wds_get_default_profile_num_output_get_default_profile_number ( |
| 1365 |
QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, |
| 1366 |
guint8 *value_default_profile_number, |
| 1367 |
GError **error) |
| 1368 |
{ |
| 1369 |
return qmi_message_wds_get_default_profile_number_output_get_index (self, |
| 1370 |
value_default_profile_number, |
| 1371 |
error); |
| 1372 |
} |
| 1373 |
|
| 1374 |
gboolean |
| 1375 |
qmi_message_wds_get_default_profile_num_output_get_extended_error_code ( |
| 1376 |
QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, |
| 1377 |
QmiWdsDsProfileError *value_extended_error_code, |
| 1378 |
GError **error) |
| 1379 |
{ |
| 1380 |
return qmi_message_wds_get_default_profile_number_output_get_extended_error_code (self, |
| 1381 |
value_extended_error_code, |
| 1382 |
error); |
| 1383 |
} |
| 1384 |
|
| 1385 |
QmiDeprecatedMessageWdsGetDefaultProfileNumOutput * |
| 1386 |
qmi_message_wds_get_default_profile_num_output_ref (QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self) |
| 1387 |
{ |
| 1388 |
return qmi_message_wds_get_default_profile_number_output_ref (self); |
| 1389 |
} |
| 1390 |
|
| 1391 |
void |
| 1392 |
qmi_message_wds_get_default_profile_num_output_unref (QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self) |
| 1393 |
{ |
| 1394 |
qmi_message_wds_get_default_profile_number_output_unref (self); |
| 1395 |
} |
| 1396 |
|
| 1397 |
void |
| 1398 |
qmi_client_wds_get_default_profile_num ( |
| 1399 |
QmiClientWds *self, |
| 1400 |
QmiMessageWdsGetDefaultProfileNumberInput *input, |
| 1401 |
guint timeout, |
| 1402 |
GCancellable *cancellable, |
| 1403 |
GAsyncReadyCallback callback, |
| 1404 |
gpointer user_data) |
| 1405 |
{ |
| 1406 |
qmi_client_wds_get_default_profile_number ( |
| 1407 |
self, |
| 1408 |
input, |
| 1409 |
timeout, |
| 1410 |
cancellable, |
| 1411 |
callback, |
| 1412 |
user_data); |
| 1413 |
} |
| 1414 |
|
| 1415 |
QmiMessageWdsGetDefaultProfileNumberOutput * |
| 1416 |
qmi_client_wds_get_default_profile_num_finish ( |
| 1417 |
QmiClientWds *self, |
| 1418 |
GAsyncResult *res, |
| 1419 |
GError **error) |
| 1420 |
{ |
| 1421 |
return qmi_client_wds_get_default_profile_number_finish (self, res, error); |
| 1422 |
} |
| 1423 |
|
| 1424 |
#endif /* HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER */ |
| 1425 |
|
| 1426 |
#if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER |
| 1427 |
|
| 1428 |
GType |
| 1429 |
qmi_message_wds_set_default_profile_num_output_get_type (void) |
| 1430 |
{ |
| 1431 |
return qmi_message_wds_set_default_profile_number_output_get_type (); |
| 1432 |
} |
| 1433 |
|
| 1434 |
gboolean |
| 1435 |
qmi_message_wds_set_default_profile_num_input_get_profile_identifier ( |
| 1436 |
QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self, |
| 1437 |
QmiWdsProfileType *value_profile_identifier_profile_type, |
| 1438 |
QmiWdsProfileFamily *value_profile_identifier_profile_family, |
| 1439 |
guint8 *value_profile_identifier_profile_index, |
| 1440 |
GError **error) |
| 1441 |
{ |
| 1442 |
return qmi_message_wds_set_default_profile_number_input_get_profile_identifier (self, |
| 1443 |
value_profile_identifier_profile_type, |
| 1444 |
value_profile_identifier_profile_family, |
| 1445 |
value_profile_identifier_profile_index, |
| 1446 |
error); |
| 1447 |
} |
| 1448 |
|
| 1449 |
gboolean |
| 1450 |
qmi_message_wds_set_default_profile_num_input_set_profile_identifier ( |
| 1451 |
QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self, |
| 1452 |
QmiWdsProfileType value_profile_identifier_profile_type, |
| 1453 |
QmiWdsProfileFamily value_profile_identifier_profile_family, |
| 1454 |
guint8 value_profile_identifier_profile_index, |
| 1455 |
GError **error) |
| 1456 |
{ |
| 1457 |
return qmi_message_wds_set_default_profile_number_input_set_profile_identifier (self, |
| 1458 |
value_profile_identifier_profile_type, |
| 1459 |
value_profile_identifier_profile_family, |
| 1460 |
value_profile_identifier_profile_index, |
| 1461 |
error); |
| 1462 |
} |
| 1463 |
|
| 1464 |
QmiDeprecatedMessageWdsSetDefaultProfileNumInput * |
| 1465 |
qmi_message_wds_set_default_profile_num_input_ref (QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self) |
| 1466 |
{ |
| 1467 |
return qmi_message_wds_set_default_profile_number_input_ref (self); |
| 1468 |
} |
| 1469 |
|
| 1470 |
void |
| 1471 |
qmi_message_wds_set_default_profile_num_input_unref (QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self) |
| 1472 |
{ |
| 1473 |
qmi_message_wds_set_default_profile_number_input_unref (self); |
| 1474 |
} |
| 1475 |
|
| 1476 |
QmiDeprecatedMessageWdsSetDefaultProfileNumInput * |
| 1477 |
qmi_message_wds_set_default_profile_num_input_new (void) |
| 1478 |
{ |
| 1479 |
return qmi_message_wds_set_default_profile_number_input_new (); |
| 1480 |
} |
| 1481 |
|
| 1482 |
GType |
| 1483 |
qmi_message_wds_set_default_profile_num_input_get_type (void) |
| 1484 |
{ |
| 1485 |
return qmi_message_wds_set_default_profile_number_input_get_type (); |
| 1486 |
} |
| 1487 |
|
| 1488 |
gboolean |
| 1489 |
qmi_message_wds_set_default_profile_num_output_get_result ( |
| 1490 |
QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self, |
| 1491 |
GError **error) |
| 1492 |
{ |
| 1493 |
return qmi_message_wds_set_default_profile_number_output_get_result (self, error); |
| 1494 |
} |
| 1495 |
|
| 1496 |
gboolean |
| 1497 |
qmi_message_wds_set_default_profile_num_output_get_extended_error_code ( |
| 1498 |
QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self, |
| 1499 |
QmiWdsDsProfileError *value_extended_error_code, |
| 1500 |
GError **error) |
| 1501 |
{ |
| 1502 |
return qmi_message_wds_set_default_profile_number_output_get_extended_error_code (self, |
| 1503 |
value_extended_error_code, |
| 1504 |
error); |
| 1505 |
} |
| 1506 |
|
| 1507 |
QmiDeprecatedMessageWdsSetDefaultProfileNumOutput * |
| 1508 |
qmi_message_wds_set_default_profile_num_output_ref (QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self) |
| 1509 |
{ |
| 1510 |
return qmi_message_wds_set_default_profile_number_output_ref (self); |
| 1511 |
} |
| 1512 |
|
| 1513 |
void |
| 1514 |
qmi_message_wds_set_default_profile_num_output_unref (QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self) |
| 1515 |
{ |
| 1516 |
qmi_message_wds_set_default_profile_number_output_unref (self); |
| 1517 |
} |
| 1518 |
|
| 1519 |
void |
| 1520 |
qmi_client_wds_set_default_profile_num ( |
| 1521 |
QmiClientWds *self, |
| 1522 |
QmiMessageWdsSetDefaultProfileNumberInput *input, |
| 1523 |
guint timeout, |
| 1524 |
GCancellable *cancellable, |
| 1525 |
GAsyncReadyCallback callback, |
| 1526 |
gpointer user_data) |
| 1527 |
{ |
| 1528 |
qmi_client_wds_set_default_profile_number ( |
| 1529 |
self, |
| 1530 |
input, |
| 1531 |
timeout, |
| 1532 |
cancellable, |
| 1533 |
callback, |
| 1534 |
user_data); |
| 1535 |
} |
| 1536 |
|
| 1537 |
QmiMessageWdsSetDefaultProfileNumberOutput * |
| 1538 |
qmi_client_wds_set_default_profile_num_finish ( |
| 1539 |
QmiClientWds *self, |
| 1540 |
GAsyncResult *res, |
| 1541 |
GError **error) |
| 1542 |
{ |
| 1543 |
return qmi_client_wds_set_default_profile_number_finish (self, res, error); |
| 1544 |
} |
| 1545 |
|
| 1546 |
#endif /* HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER */ |
| 1547 |
|
| 1548 |
#if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO |
| 1549 |
|
| 1550 |
gboolean |
| 1551 |
qmi_message_nas_get_system_info_output_get_gsm_system_info ( |
| 1552 |
QmiMessageNasGetSystemInfoOutput *self, |
| 1553 |
gboolean *value_gsm_system_info_domain_valid, |
| 1554 |
QmiNasNetworkServiceDomain *value_gsm_system_info_domain, |
| 1555 |
gboolean *value_gsm_system_info_service_capability_valid, |
| 1556 |
QmiNasNetworkServiceDomain *value_gsm_system_info_service_capability, |
| 1557 |
gboolean *value_gsm_system_info_roaming_status_valid, |
| 1558 |
QmiNasRoamingStatus *value_gsm_system_info_roaming_status, |
| 1559 |
gboolean *value_gsm_system_info_forbidden_valid, |
| 1560 |
gboolean *value_gsm_system_info_forbidden, |
| 1561 |
gboolean *value_gsm_system_info_lac_valid, |
| 1562 |
guint16 *value_gsm_system_info_lac, |
| 1563 |
gboolean *value_gsm_system_info_cid_valid, |
| 1564 |
guint32 *value_gsm_system_info_cid, |
| 1565 |
gboolean *value_gsm_system_info_registration_reject_info_valid, |
| 1566 |
QmiNasNetworkServiceDomain *value_gsm_system_info_registration_reject_domain, |
| 1567 |
guint8 *value_gsm_system_info_registration_reject_cause, |
| 1568 |
gboolean *value_gsm_system_info_network_id_valid, |
| 1569 |
const gchar **value_gsm_system_info_mcc, |
| 1570 |
const gchar **value_gsm_system_info_mnc, |
| 1571 |
gboolean *value_gsm_system_info_egprs_support_valid, |
| 1572 |
gboolean *value_gsm_system_info_egprs_support, |
| 1573 |
gboolean *value_gsm_system_info_dtm_support_valid, |
| 1574 |
gboolean *value_gsm_system_info_dtm_support, |
| 1575 |
GError **error) |
| 1576 |
{ |
| 1577 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1578 |
|
| 1579 |
if (!qmi_message_nas_get_system_info_output_get_gsm_system_info_v2 ( |
| 1580 |
self, |
| 1581 |
value_gsm_system_info_domain_valid, |
| 1582 |
value_gsm_system_info_domain, |
| 1583 |
value_gsm_system_info_service_capability_valid, |
| 1584 |
value_gsm_system_info_service_capability, |
| 1585 |
value_gsm_system_info_roaming_status_valid, |
| 1586 |
value_gsm_system_info_roaming_status, |
| 1587 |
value_gsm_system_info_forbidden_valid, |
| 1588 |
value_gsm_system_info_forbidden, |
| 1589 |
value_gsm_system_info_lac_valid, |
| 1590 |
value_gsm_system_info_lac, |
| 1591 |
value_gsm_system_info_cid_valid, |
| 1592 |
value_gsm_system_info_cid, |
| 1593 |
value_gsm_system_info_registration_reject_info_valid, |
| 1594 |
value_gsm_system_info_registration_reject_domain, |
| 1595 |
&reject_cause, |
| 1596 |
value_gsm_system_info_network_id_valid, |
| 1597 |
value_gsm_system_info_mcc, |
| 1598 |
value_gsm_system_info_mnc, |
| 1599 |
value_gsm_system_info_egprs_support_valid, |
| 1600 |
value_gsm_system_info_egprs_support, |
| 1601 |
value_gsm_system_info_dtm_support_valid, |
| 1602 |
value_gsm_system_info_dtm_support, |
| 1603 |
error)) |
| 1604 |
return FALSE; |
| 1605 |
|
| 1606 |
if (value_gsm_system_info_registration_reject_cause) |
| 1607 |
*value_gsm_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1608 |
return TRUE; |
| 1609 |
} |
| 1610 |
|
| 1611 |
gboolean |
| 1612 |
qmi_message_nas_get_system_info_output_get_wcdma_system_info ( |
| 1613 |
QmiMessageNasGetSystemInfoOutput *self, |
| 1614 |
gboolean *value_wcdma_system_info_domain_valid, |
| 1615 |
QmiNasNetworkServiceDomain *value_wcdma_system_info_domain, |
| 1616 |
gboolean *value_wcdma_system_info_service_capability_valid, |
| 1617 |
QmiNasNetworkServiceDomain *value_wcdma_system_info_service_capability, |
| 1618 |
gboolean *value_wcdma_system_info_roaming_status_valid, |
| 1619 |
QmiNasRoamingStatus *value_wcdma_system_info_roaming_status, |
| 1620 |
gboolean *value_wcdma_system_info_forbidden_valid, |
| 1621 |
gboolean *value_wcdma_system_info_forbidden, |
| 1622 |
gboolean *value_wcdma_system_info_lac_valid, |
| 1623 |
guint16 *value_wcdma_system_info_lac, |
| 1624 |
gboolean *value_wcdma_system_info_cid_valid, |
| 1625 |
guint32 *value_wcdma_system_info_cid, |
| 1626 |
gboolean *value_wcdma_system_info_registration_reject_info_valid, |
| 1627 |
QmiNasNetworkServiceDomain *value_wcdma_system_info_registration_reject_domain, |
| 1628 |
guint8 *value_wcdma_system_info_registration_reject_cause, |
| 1629 |
gboolean *value_wcdma_system_info_network_id_valid, |
| 1630 |
const gchar **value_wcdma_system_info_mcc, |
| 1631 |
const gchar **value_wcdma_system_info_mnc, |
| 1632 |
gboolean *value_wcdma_system_info_hs_call_status_valid, |
| 1633 |
QmiNasWcdmaHsService *value_wcdma_system_info_hs_call_status, |
| 1634 |
gboolean *value_wcdma_system_info_hs_service_valid, |
| 1635 |
QmiNasWcdmaHsService *value_wcdma_system_info_hs_service, |
| 1636 |
gboolean *value_wcdma_system_info_primary_scrambling_code_valid, |
| 1637 |
guint16 *value_wcdma_system_info_primary_scrambling_code, |
| 1638 |
GError **error) |
| 1639 |
{ |
| 1640 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1641 |
|
| 1642 |
if (!qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2 ( |
| 1643 |
self, |
| 1644 |
value_wcdma_system_info_domain_valid, |
| 1645 |
value_wcdma_system_info_domain, |
| 1646 |
value_wcdma_system_info_service_capability_valid, |
| 1647 |
value_wcdma_system_info_service_capability, |
| 1648 |
value_wcdma_system_info_roaming_status_valid, |
| 1649 |
value_wcdma_system_info_roaming_status, |
| 1650 |
value_wcdma_system_info_forbidden_valid, |
| 1651 |
value_wcdma_system_info_forbidden, |
| 1652 |
value_wcdma_system_info_lac_valid, |
| 1653 |
value_wcdma_system_info_lac, |
| 1654 |
value_wcdma_system_info_cid_valid, |
| 1655 |
value_wcdma_system_info_cid, |
| 1656 |
value_wcdma_system_info_registration_reject_info_valid, |
| 1657 |
value_wcdma_system_info_registration_reject_domain, |
| 1658 |
&reject_cause, |
| 1659 |
value_wcdma_system_info_network_id_valid, |
| 1660 |
value_wcdma_system_info_mcc, |
| 1661 |
value_wcdma_system_info_mnc, |
| 1662 |
value_wcdma_system_info_hs_call_status_valid, |
| 1663 |
value_wcdma_system_info_hs_call_status, |
| 1664 |
value_wcdma_system_info_hs_service_valid, |
| 1665 |
value_wcdma_system_info_hs_service, |
| 1666 |
value_wcdma_system_info_primary_scrambling_code_valid, |
| 1667 |
value_wcdma_system_info_primary_scrambling_code, |
| 1668 |
error)) |
| 1669 |
return FALSE; |
| 1670 |
|
| 1671 |
if (value_wcdma_system_info_registration_reject_cause) |
| 1672 |
*value_wcdma_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1673 |
return TRUE; |
| 1674 |
} |
| 1675 |
|
| 1676 |
gboolean |
| 1677 |
qmi_message_nas_get_system_info_output_get_lte_system_info ( |
| 1678 |
QmiMessageNasGetSystemInfoOutput *self, |
| 1679 |
gboolean *value_lte_system_info_domain_valid, |
| 1680 |
QmiNasNetworkServiceDomain *value_lte_system_info_domain, |
| 1681 |
gboolean *value_lte_system_info_service_capability_valid, |
| 1682 |
QmiNasNetworkServiceDomain *value_lte_system_info_service_capability, |
| 1683 |
gboolean *value_lte_system_info_roaming_status_valid, |
| 1684 |
QmiNasRoamingStatus *value_lte_system_info_roaming_status, |
| 1685 |
gboolean *value_lte_system_info_forbidden_valid, |
| 1686 |
gboolean *value_lte_system_info_forbidden, |
| 1687 |
gboolean *value_lte_system_info_lac_valid, |
| 1688 |
guint16 *value_lte_system_info_lac, |
| 1689 |
gboolean *value_lte_system_info_cid_valid, |
| 1690 |
guint32 *value_lte_system_info_cid, |
| 1691 |
gboolean *value_lte_system_info_registration_reject_info_valid, |
| 1692 |
QmiNasNetworkServiceDomain *value_lte_system_info_registration_reject_domain, |
| 1693 |
guint8 *value_lte_system_info_registration_reject_cause, |
| 1694 |
gboolean *value_lte_system_info_network_id_valid, |
| 1695 |
const gchar **value_lte_system_info_mcc, |
| 1696 |
const gchar **value_lte_system_info_mnc, |
| 1697 |
gboolean *value_lte_system_info_tac_valid, |
| 1698 |
guint16 *value_lte_system_info_tac, |
| 1699 |
GError **error) |
| 1700 |
{ |
| 1701 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1702 |
|
| 1703 |
if (!qmi_message_nas_get_system_info_output_get_lte_system_info_v2 ( |
| 1704 |
self, |
| 1705 |
value_lte_system_info_domain_valid, |
| 1706 |
value_lte_system_info_domain, |
| 1707 |
value_lte_system_info_service_capability_valid, |
| 1708 |
value_lte_system_info_service_capability, |
| 1709 |
value_lte_system_info_roaming_status_valid, |
| 1710 |
value_lte_system_info_roaming_status, |
| 1711 |
value_lte_system_info_forbidden_valid, |
| 1712 |
value_lte_system_info_forbidden, |
| 1713 |
value_lte_system_info_lac_valid, |
| 1714 |
value_lte_system_info_lac, |
| 1715 |
value_lte_system_info_cid_valid, |
| 1716 |
value_lte_system_info_cid, |
| 1717 |
value_lte_system_info_registration_reject_info_valid, |
| 1718 |
value_lte_system_info_registration_reject_domain, |
| 1719 |
&reject_cause, |
| 1720 |
value_lte_system_info_network_id_valid, |
| 1721 |
value_lte_system_info_mcc, |
| 1722 |
value_lte_system_info_mnc, |
| 1723 |
value_lte_system_info_tac_valid, |
| 1724 |
value_lte_system_info_tac, |
| 1725 |
error)) |
| 1726 |
return FALSE; |
| 1727 |
|
| 1728 |
if (value_lte_system_info_registration_reject_cause) |
| 1729 |
*value_lte_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1730 |
|
| 1731 |
return TRUE; |
| 1732 |
} |
| 1733 |
|
| 1734 |
gboolean |
| 1735 |
qmi_message_nas_get_system_info_output_get_td_scdma_system_info ( |
| 1736 |
QmiMessageNasGetSystemInfoOutput *self, |
| 1737 |
gboolean *value_td_scdma_system_info_domain_valid, |
| 1738 |
QmiNasNetworkServiceDomain *value_td_scdma_system_info_domain, |
| 1739 |
gboolean *value_td_scdma_system_info_service_capability_valid, |
| 1740 |
QmiNasNetworkServiceDomain *value_td_scdma_system_info_service_capability, |
| 1741 |
gboolean *value_td_scdma_system_info_roaming_status_valid, |
| 1742 |
QmiNasRoamingStatus *value_td_scdma_system_info_roaming_status, |
| 1743 |
gboolean *value_td_scdma_system_info_forbidden_valid, |
| 1744 |
gboolean *value_td_scdma_system_info_forbidden, |
| 1745 |
gboolean *value_td_scdma_system_info_lac_valid, |
| 1746 |
guint16 *value_td_scdma_system_info_lac, |
| 1747 |
gboolean *value_td_scdma_system_info_cid_valid, |
| 1748 |
guint32 *value_td_scdma_system_info_cid, |
| 1749 |
gboolean *value_td_scdma_system_info_registration_reject_info_valid, |
| 1750 |
QmiNasNetworkServiceDomain *value_td_scdma_system_info_registration_reject_domain, |
| 1751 |
guint8 *value_td_scdma_system_info_registration_reject_cause, |
| 1752 |
gboolean *value_td_scdma_system_info_network_id_valid, |
| 1753 |
const gchar **value_td_scdma_system_info_mcc, |
| 1754 |
const gchar **value_td_scdma_system_info_mnc, |
| 1755 |
gboolean *value_td_scdma_system_info_hs_call_status_valid, |
| 1756 |
QmiNasWcdmaHsService *value_td_scdma_system_info_hs_call_status, |
| 1757 |
gboolean *value_td_scdma_system_info_hs_service_valid, |
| 1758 |
QmiNasWcdmaHsService *value_td_scdma_system_info_hs_service, |
| 1759 |
gboolean *value_td_scdma_system_info_cell_parameter_id_valid, |
| 1760 |
guint16 *value_td_scdma_system_info_cell_parameter_id, |
| 1761 |
gboolean *value_td_scdma_system_info_cell_broadcast_support_valid, |
| 1762 |
QmiNasCellBroadcastCapability *value_td_scdma_system_info_cell_broadcast_support, |
| 1763 |
gboolean *value_td_scdma_system_info_cs_call_barring_status_valid, |
| 1764 |
QmiNasCallBarringStatus *value_td_scdma_system_info_cs_call_barring_status, |
| 1765 |
gboolean *value_td_scdma_system_info_ps_call_barring_status_valid, |
| 1766 |
QmiNasCallBarringStatus *value_td_scdma_system_info_ps_call_barring_status, |
| 1767 |
gboolean *value_td_scdma_system_info_cipher_domain_valid, |
| 1768 |
QmiNasNetworkServiceDomain *value_td_scdma_system_info_cipher_domain, |
| 1769 |
GError **error) |
| 1770 |
{ |
| 1771 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1772 |
|
| 1773 |
if (!qmi_message_nas_get_system_info_output_get_td_scdma_system_info_v2 ( |
| 1774 |
self, |
| 1775 |
value_td_scdma_system_info_domain_valid, |
| 1776 |
value_td_scdma_system_info_domain, |
| 1777 |
value_td_scdma_system_info_service_capability_valid, |
| 1778 |
value_td_scdma_system_info_service_capability, |
| 1779 |
value_td_scdma_system_info_roaming_status_valid, |
| 1780 |
value_td_scdma_system_info_roaming_status, |
| 1781 |
value_td_scdma_system_info_forbidden_valid, |
| 1782 |
value_td_scdma_system_info_forbidden, |
| 1783 |
value_td_scdma_system_info_lac_valid, |
| 1784 |
value_td_scdma_system_info_lac, |
| 1785 |
value_td_scdma_system_info_cid_valid, |
| 1786 |
value_td_scdma_system_info_cid, |
| 1787 |
value_td_scdma_system_info_registration_reject_info_valid, |
| 1788 |
value_td_scdma_system_info_registration_reject_domain, |
| 1789 |
&reject_cause, |
| 1790 |
value_td_scdma_system_info_network_id_valid, |
| 1791 |
value_td_scdma_system_info_mcc, |
| 1792 |
value_td_scdma_system_info_mnc, |
| 1793 |
value_td_scdma_system_info_hs_call_status_valid, |
| 1794 |
value_td_scdma_system_info_hs_call_status, |
| 1795 |
value_td_scdma_system_info_hs_service_valid, |
| 1796 |
value_td_scdma_system_info_hs_service, |
| 1797 |
value_td_scdma_system_info_cell_parameter_id_valid, |
| 1798 |
value_td_scdma_system_info_cell_parameter_id, |
| 1799 |
value_td_scdma_system_info_cell_broadcast_support_valid, |
| 1800 |
value_td_scdma_system_info_cell_broadcast_support, |
| 1801 |
value_td_scdma_system_info_cs_call_barring_status_valid, |
| 1802 |
value_td_scdma_system_info_cs_call_barring_status, |
| 1803 |
value_td_scdma_system_info_ps_call_barring_status_valid, |
| 1804 |
value_td_scdma_system_info_ps_call_barring_status, |
| 1805 |
value_td_scdma_system_info_cipher_domain_valid, |
| 1806 |
value_td_scdma_system_info_cipher_domain, |
| 1807 |
error)) |
| 1808 |
return FALSE; |
| 1809 |
|
| 1810 |
if (value_td_scdma_system_info_registration_reject_cause) |
| 1811 |
*value_td_scdma_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1812 |
return TRUE; |
| 1813 |
} |
| 1814 |
|
| 1815 |
#endif /* HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO */ |
| 1816 |
|
| 1817 |
#if defined HAVE_QMI_INDICATION_NAS_SYSTEM_INFO |
| 1818 |
|
| 1819 |
gboolean qmi_indication_nas_system_info_output_get_gsm_system_info ( |
| 1820 |
QmiIndicationNasSystemInfoOutput *self, |
| 1821 |
gboolean *value_gsm_system_info_domain_valid, |
| 1822 |
QmiNasNetworkServiceDomain *value_gsm_system_info_domain, |
| 1823 |
gboolean *value_gsm_system_info_service_capability_valid, |
| 1824 |
QmiNasNetworkServiceDomain *value_gsm_system_info_service_capability, |
| 1825 |
gboolean *value_gsm_system_info_roaming_status_valid, |
| 1826 |
QmiNasRoamingStatus *value_gsm_system_info_roaming_status, |
| 1827 |
gboolean *value_gsm_system_info_forbidden_valid, |
| 1828 |
gboolean *value_gsm_system_info_forbidden, |
| 1829 |
gboolean *value_gsm_system_info_lac_valid, |
| 1830 |
guint16 *value_gsm_system_info_lac, |
| 1831 |
gboolean *value_gsm_system_info_cid_valid, |
| 1832 |
guint32 *value_gsm_system_info_cid, |
| 1833 |
gboolean *value_gsm_system_info_registration_reject_info_valid, |
| 1834 |
QmiNasNetworkServiceDomain *value_gsm_system_info_registration_reject_domain, |
| 1835 |
guint8 *value_gsm_system_info_registration_reject_cause, |
| 1836 |
gboolean *value_gsm_system_info_network_id_valid, |
| 1837 |
const gchar **value_gsm_system_info_mcc, |
| 1838 |
const gchar **value_gsm_system_info_mnc, |
| 1839 |
gboolean *value_gsm_system_info_egprs_support_valid, |
| 1840 |
gboolean *value_gsm_system_info_egprs_support, |
| 1841 |
gboolean *value_gsm_system_info_dtm_support_valid, |
| 1842 |
gboolean *value_gsm_system_info_dtm_support, |
| 1843 |
GError **error) |
| 1844 |
{ |
| 1845 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1846 |
|
| 1847 |
if (!qmi_indication_nas_system_info_output_get_gsm_system_info_v2 ( |
| 1848 |
self, |
| 1849 |
value_gsm_system_info_domain_valid, |
| 1850 |
value_gsm_system_info_domain, |
| 1851 |
value_gsm_system_info_service_capability_valid, |
| 1852 |
value_gsm_system_info_service_capability, |
| 1853 |
value_gsm_system_info_roaming_status_valid, |
| 1854 |
value_gsm_system_info_roaming_status, |
| 1855 |
value_gsm_system_info_forbidden_valid, |
| 1856 |
value_gsm_system_info_forbidden, |
| 1857 |
value_gsm_system_info_lac_valid, |
| 1858 |
value_gsm_system_info_lac, |
| 1859 |
value_gsm_system_info_cid_valid, |
| 1860 |
value_gsm_system_info_cid, |
| 1861 |
value_gsm_system_info_registration_reject_info_valid, |
| 1862 |
value_gsm_system_info_registration_reject_domain, |
| 1863 |
&reject_cause, |
| 1864 |
value_gsm_system_info_network_id_valid, |
| 1865 |
value_gsm_system_info_mcc, |
| 1866 |
value_gsm_system_info_mnc, |
| 1867 |
value_gsm_system_info_egprs_support_valid, |
| 1868 |
value_gsm_system_info_egprs_support, |
| 1869 |
value_gsm_system_info_dtm_support_valid, |
| 1870 |
value_gsm_system_info_dtm_support, |
| 1871 |
error)) |
| 1872 |
return FALSE; |
| 1873 |
|
| 1874 |
if (value_gsm_system_info_registration_reject_cause) |
| 1875 |
*value_gsm_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1876 |
return TRUE; |
| 1877 |
} |
| 1878 |
|
| 1879 |
gboolean qmi_indication_nas_system_info_output_get_wcdma_system_info ( |
| 1880 |
QmiIndicationNasSystemInfoOutput *self, |
| 1881 |
gboolean *value_wcdma_system_info_domain_valid, |
| 1882 |
QmiNasNetworkServiceDomain *value_wcdma_system_info_domain, |
| 1883 |
gboolean *value_wcdma_system_info_service_capability_valid, |
| 1884 |
QmiNasNetworkServiceDomain *value_wcdma_system_info_service_capability, |
| 1885 |
gboolean *value_wcdma_system_info_roaming_status_valid, |
| 1886 |
QmiNasRoamingStatus *value_wcdma_system_info_roaming_status, |
| 1887 |
gboolean *value_wcdma_system_info_forbidden_valid, |
| 1888 |
gboolean *value_wcdma_system_info_forbidden, |
| 1889 |
gboolean *value_wcdma_system_info_lac_valid, |
| 1890 |
guint16 *value_wcdma_system_info_lac, |
| 1891 |
gboolean *value_wcdma_system_info_cid_valid, |
| 1892 |
guint32 *value_wcdma_system_info_cid, |
| 1893 |
gboolean *value_wcdma_system_info_registration_reject_info_valid, |
| 1894 |
QmiNasNetworkServiceDomain *value_wcdma_system_info_registration_reject_domain, |
| 1895 |
guint8 *value_wcdma_system_info_registration_reject_cause, |
| 1896 |
gboolean *value_wcdma_system_info_network_id_valid, |
| 1897 |
const gchar **value_wcdma_system_info_mcc, |
| 1898 |
const gchar **value_wcdma_system_info_mnc, |
| 1899 |
gboolean *value_wcdma_system_info_hs_call_status_valid, |
| 1900 |
QmiNasWcdmaHsService *value_wcdma_system_info_hs_call_status, |
| 1901 |
gboolean *value_wcdma_system_info_hs_service_valid, |
| 1902 |
QmiNasWcdmaHsService *value_wcdma_system_info_hs_service, |
| 1903 |
gboolean *value_wcdma_system_info_primary_scrambling_code_valid, |
| 1904 |
guint16 *value_wcdma_system_info_primary_scrambling_code, |
| 1905 |
GError **error) |
| 1906 |
{ |
| 1907 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1908 |
|
| 1909 |
if (!qmi_indication_nas_system_info_output_get_wcdma_system_info_v2 ( |
| 1910 |
self, |
| 1911 |
value_wcdma_system_info_domain_valid, |
| 1912 |
value_wcdma_system_info_domain, |
| 1913 |
value_wcdma_system_info_service_capability_valid, |
| 1914 |
value_wcdma_system_info_service_capability, |
| 1915 |
value_wcdma_system_info_roaming_status_valid, |
| 1916 |
value_wcdma_system_info_roaming_status, |
| 1917 |
value_wcdma_system_info_forbidden_valid, |
| 1918 |
value_wcdma_system_info_forbidden, |
| 1919 |
value_wcdma_system_info_lac_valid, |
| 1920 |
value_wcdma_system_info_lac, |
| 1921 |
value_wcdma_system_info_cid_valid, |
| 1922 |
value_wcdma_system_info_cid, |
| 1923 |
value_wcdma_system_info_registration_reject_info_valid, |
| 1924 |
value_wcdma_system_info_registration_reject_domain, |
| 1925 |
&reject_cause, |
| 1926 |
value_wcdma_system_info_network_id_valid, |
| 1927 |
value_wcdma_system_info_mcc, |
| 1928 |
value_wcdma_system_info_mnc, |
| 1929 |
value_wcdma_system_info_hs_call_status_valid, |
| 1930 |
value_wcdma_system_info_hs_call_status, |
| 1931 |
value_wcdma_system_info_hs_service_valid, |
| 1932 |
value_wcdma_system_info_hs_service, |
| 1933 |
value_wcdma_system_info_primary_scrambling_code_valid, |
| 1934 |
value_wcdma_system_info_primary_scrambling_code, |
| 1935 |
error)) |
| 1936 |
return FALSE; |
| 1937 |
|
| 1938 |
if (value_wcdma_system_info_registration_reject_cause) |
| 1939 |
*value_wcdma_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1940 |
return TRUE; |
| 1941 |
} |
| 1942 |
|
| 1943 |
gboolean |
| 1944 |
qmi_indication_nas_system_info_output_get_lte_system_info ( |
| 1945 |
QmiIndicationNasSystemInfoOutput *self, |
| 1946 |
gboolean *value_lte_system_info_domain_valid, |
| 1947 |
QmiNasNetworkServiceDomain *value_lte_system_info_domain, |
| 1948 |
gboolean *value_lte_system_info_service_capability_valid, |
| 1949 |
QmiNasNetworkServiceDomain *value_lte_system_info_service_capability, |
| 1950 |
gboolean *value_lte_system_info_roaming_status_valid, |
| 1951 |
QmiNasRoamingStatus *value_lte_system_info_roaming_status, |
| 1952 |
gboolean *value_lte_system_info_forbidden_valid, |
| 1953 |
gboolean *value_lte_system_info_forbidden, |
| 1954 |
gboolean *value_lte_system_info_lac_valid, |
| 1955 |
guint16 *value_lte_system_info_lac, |
| 1956 |
gboolean *value_lte_system_info_cid_valid, |
| 1957 |
guint32 *value_lte_system_info_cid, |
| 1958 |
gboolean *value_lte_system_info_registration_reject_info_valid, |
| 1959 |
QmiNasNetworkServiceDomain *value_lte_system_info_registration_reject_domain, |
| 1960 |
guint8 *value_lte_system_info_registration_reject_cause, |
| 1961 |
gboolean *value_lte_system_info_network_id_valid, |
| 1962 |
const gchar **value_lte_system_info_mcc, |
| 1963 |
const gchar **value_lte_system_info_mnc, |
| 1964 |
gboolean *value_lte_system_info_tac_valid, |
| 1965 |
guint16 *value_lte_system_info_tac, |
| 1966 |
GError **error) |
| 1967 |
{ |
| 1968 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 1969 |
|
| 1970 |
if (!qmi_indication_nas_system_info_output_get_lte_system_info_v2 ( |
| 1971 |
self, |
| 1972 |
value_lte_system_info_domain_valid, |
| 1973 |
value_lte_system_info_domain, |
| 1974 |
value_lte_system_info_service_capability_valid, |
| 1975 |
value_lte_system_info_service_capability, |
| 1976 |
value_lte_system_info_roaming_status_valid, |
| 1977 |
value_lte_system_info_roaming_status, |
| 1978 |
value_lte_system_info_forbidden_valid, |
| 1979 |
value_lte_system_info_forbidden, |
| 1980 |
value_lte_system_info_lac_valid, |
| 1981 |
value_lte_system_info_lac, |
| 1982 |
value_lte_system_info_cid_valid, |
| 1983 |
value_lte_system_info_cid, |
| 1984 |
value_lte_system_info_registration_reject_info_valid, |
| 1985 |
value_lte_system_info_registration_reject_domain, |
| 1986 |
&reject_cause, |
| 1987 |
value_lte_system_info_network_id_valid, |
| 1988 |
value_lte_system_info_mcc, |
| 1989 |
value_lte_system_info_mnc, |
| 1990 |
value_lte_system_info_tac_valid, |
| 1991 |
value_lte_system_info_tac, |
| 1992 |
error)) |
| 1993 |
return FALSE; |
| 1994 |
|
| 1995 |
if (value_lte_system_info_registration_reject_cause) |
| 1996 |
*value_lte_system_info_registration_reject_cause = (guint8) reject_cause; |
| 1997 |
return TRUE; |
| 1998 |
} |
| 1999 |
|
| 2000 |
gboolean |
| 2001 |
qmi_indication_nas_system_info_output_get_td_scma_system_info ( |
| 2002 |
QmiIndicationNasSystemInfoOutput *self, |
| 2003 |
gboolean *value_td_scma_system_info_domain_valid, |
| 2004 |
QmiNasNetworkServiceDomain *value_td_scma_system_info_domain, |
| 2005 |
gboolean *value_td_scma_system_info_service_capability_valid, |
| 2006 |
QmiNasNetworkServiceDomain *value_td_scma_system_info_service_capability, |
| 2007 |
gboolean *value_td_scma_system_info_roaming_status_valid, |
| 2008 |
QmiNasRoamingStatus *value_td_scma_system_info_roaming_status, |
| 2009 |
gboolean *value_td_scma_system_info_forbidden_valid, |
| 2010 |
gboolean *value_td_scma_system_info_forbidden, |
| 2011 |
gboolean *value_td_scma_system_info_lac_valid, |
| 2012 |
guint16 *value_td_scma_system_info_lac, |
| 2013 |
gboolean *value_td_scma_system_info_cid_valid, |
| 2014 |
guint32 *value_td_scma_system_info_cid, |
| 2015 |
gboolean *value_td_scma_system_info_registration_reject_info_valid, |
| 2016 |
QmiNasNetworkServiceDomain *value_td_scma_system_info_registration_reject_domain, |
| 2017 |
guint8 *value_td_scma_system_info_registration_reject_cause, |
| 2018 |
gboolean *value_td_scma_system_info_network_id_valid, |
| 2019 |
const gchar **value_td_scma_system_info_mcc, |
| 2020 |
const gchar **value_td_scma_system_info_mnc, |
| 2021 |
gboolean *value_td_scma_system_info_hs_call_status_valid, |
| 2022 |
QmiNasWcdmaHsService *value_td_scma_system_info_hs_call_status, |
| 2023 |
gboolean *value_td_scma_system_info_hs_service_valid, |
| 2024 |
QmiNasWcdmaHsService *value_td_scma_system_info_hs_service, |
| 2025 |
gboolean *value_td_scma_system_info_cell_parameter_id_valid, |
| 2026 |
guint16 *value_td_scma_system_info_cell_parameter_id, |
| 2027 |
gboolean *value_td_scma_system_info_cell_broadcast_support_valid, |
| 2028 |
QmiNasCellBroadcastCapability *value_td_scma_system_info_cell_broadcast_support, |
| 2029 |
gboolean *value_td_scma_system_info_cs_call_barring_status_valid, |
| 2030 |
QmiNasCallBarringStatus *value_td_scma_system_info_cs_call_barring_status, |
| 2031 |
gboolean *value_td_scma_system_info_ps_call_barring_status_valid, |
| 2032 |
QmiNasCallBarringStatus *value_td_scma_system_info_ps_call_barring_status, |
| 2033 |
gboolean *value_td_scma_system_info_cipher_domain_valid, |
| 2034 |
QmiNasNetworkServiceDomain *value_td_scma_system_info_cipher_domain, |
| 2035 |
GError **error) |
| 2036 |
{ |
| 2037 |
QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; |
| 2038 |
|
| 2039 |
if (!qmi_indication_nas_system_info_output_get_td_scma_system_info_v2 ( |
| 2040 |
self, |
| 2041 |
value_td_scma_system_info_domain_valid, |
| 2042 |
value_td_scma_system_info_domain, |
| 2043 |
value_td_scma_system_info_service_capability_valid, |
| 2044 |
value_td_scma_system_info_service_capability, |
| 2045 |
value_td_scma_system_info_roaming_status_valid, |
| 2046 |
value_td_scma_system_info_roaming_status, |
| 2047 |
value_td_scma_system_info_forbidden_valid, |
| 2048 |
value_td_scma_system_info_forbidden, |
| 2049 |
value_td_scma_system_info_lac_valid, |
| 2050 |
value_td_scma_system_info_lac, |
| 2051 |
value_td_scma_system_info_cid_valid, |
| 2052 |
value_td_scma_system_info_cid, |
| 2053 |
value_td_scma_system_info_registration_reject_info_valid, |
| 2054 |
value_td_scma_system_info_registration_reject_domain, |
| 2055 |
&reject_cause, |
| 2056 |
value_td_scma_system_info_network_id_valid, |
| 2057 |
value_td_scma_system_info_mcc, |
| 2058 |
value_td_scma_system_info_mnc, |
| 2059 |
value_td_scma_system_info_hs_call_status_valid, |
| 2060 |
value_td_scma_system_info_hs_call_status, |
| 2061 |
value_td_scma_system_info_hs_service_valid, |
| 2062 |
value_td_scma_system_info_hs_service, |
| 2063 |
value_td_scma_system_info_cell_parameter_id_valid, |
| 2064 |
value_td_scma_system_info_cell_parameter_id, |
| 2065 |
value_td_scma_system_info_cell_broadcast_support_valid, |
| 2066 |
value_td_scma_system_info_cell_broadcast_support, |
| 2067 |
value_td_scma_system_info_cs_call_barring_status_valid, |
| 2068 |
value_td_scma_system_info_cs_call_barring_status, |
| 2069 |
value_td_scma_system_info_ps_call_barring_status_valid, |
| 2070 |
value_td_scma_system_info_ps_call_barring_status, |
| 2071 |
value_td_scma_system_info_cipher_domain_valid, |
| 2072 |
value_td_scma_system_info_cipher_domain, |
| 2073 |
error)) |
| 2074 |
return FALSE; |
| 2075 |
|
| 2076 |
if (value_td_scma_system_info_registration_reject_cause) |
| 2077 |
*value_td_scma_system_info_registration_reject_cause = (guint8) reject_cause; |
| 2078 |
return TRUE; |
| 2079 |
} |
| 2080 |
|
| 2081 |
#endif /* HAVE_QMI_INDICATION_NAS_SYSTEM_INFO */ |
| 2082 |
|
| 2083 |
#if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS |
| 2084 |
|
| 2085 |
gboolean |
| 2086 |
qmi_message_nas_swi_get_status_output_get_common_info ( |
| 2087 |
QmiMessageNasSwiGetStatusOutput *self, |
| 2088 |
guint8 *value_common_info_temperature, |
| 2089 |
QmiNasSwiModemMode *value_common_info_modem_mode, |
| 2090 |
QmiNasSwiSystemMode *value_common_info_system_mode, |
| 2091 |
QmiNasSwiImsRegState *value_common_info_ims_registration_state, |
| 2092 |
QmiNasSwiPsState *value_common_info_packet_service_state, |
| 2093 |
GError **error) |
| 2094 |
{ |
| 2095 |
gint8 signed_temperature; |
| 2096 |
|
| 2097 |
if (!qmi_message_nas_swi_get_status_output_get_common_info_v2 ( |
| 2098 |
self, |
| 2099 |
&signed_temperature, |
| 2100 |
value_common_info_modem_mode, |
| 2101 |
value_common_info_system_mode, |
| 2102 |
value_common_info_ims_registration_state, |
| 2103 |
value_common_info_packet_service_state, |
| 2104 |
error)) |
| 2105 |
return FALSE; |
| 2106 |
|
| 2107 |
if (value_common_info_temperature) |
| 2108 |
memcpy (value_common_info_temperature, &signed_temperature, sizeof (guint8)); |
| 2109 |
|
| 2110 |
return TRUE; |
| 2111 |
} |
| 2112 |
|
| 2113 |
#endif /* HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS */ |
| 2114 |
|
| 2115 |
#if defined HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE |
| 2116 |
|
| 2117 |
gboolean |
| 2118 |
qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit_include_status ( |
| 2119 |
QmiMessageNasSetSystemSelectionPreferenceInput *self, |
| 2120 |
gboolean *value_mnc_pds_digit_include_status, |
| 2121 |
GError **error) |
| 2122 |
{ |
| 2123 |
return qmi_message_nas_set_system_selection_preference_input_get_mnc_pcs_digit_include_status (self, value_mnc_pds_digit_include_status, error); |
| 2124 |
} |
| 2125 |
|
| 2126 |
#endif /* HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE */ |
| 2127 |
|
| 2128 |
#if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE |
| 2129 |
|
| 2130 |
gboolean |
| 2131 |
qmi_message_pdc_config_change_input_get_type_with_id ( |
| 2132 |
QmiMessagePdcConfigChangeInput *self, |
| 2133 |
QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2134 |
GError **error) |
| 2135 |
{ |
| 2136 |
QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; |
| 2137 |
GArray *id = NULL; |
| 2138 |
|
| 2139 |
if (!qmi_message_pdc_config_change_input_get_type_with_id_v2 (self, &config_type, &id, error)) |
| 2140 |
return FALSE; |
| 2141 |
if (value_type_with_id) { |
| 2142 |
value_type_with_id->config_type = config_type; |
| 2143 |
value_type_with_id->id = id; |
| 2144 |
} |
| 2145 |
return TRUE; |
| 2146 |
} |
| 2147 |
|
| 2148 |
gboolean |
| 2149 |
qmi_message_pdc_config_change_input_set_type_with_id ( |
| 2150 |
QmiMessagePdcConfigChangeInput *self, |
| 2151 |
const QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2152 |
GError **error) |
| 2153 |
{ |
| 2154 |
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); |
| 2155 |
} |
| 2156 |
|
| 2157 |
gboolean |
| 2158 |
qmi_message_pdc_config_change_output_get_type_with_id ( |
| 2159 |
QmiMessagePdcConfigChangeOutput *self, |
| 2160 |
QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2161 |
GError **error) |
| 2162 |
{ |
| 2163 |
QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; |
| 2164 |
GArray *id = NULL; |
| 2165 |
|
| 2166 |
if (!qmi_message_pdc_config_change_output_get_type_with_id_v2 (self, &config_type, &id, error)) |
| 2167 |
return FALSE; |
| 2168 |
if (value_type_with_id) { |
| 2169 |
value_type_with_id->config_type = config_type; |
| 2170 |
value_type_with_id->id = id; |
| 2171 |
} |
| 2172 |
return TRUE; |
| 2173 |
} |
| 2174 |
|
| 2175 |
#endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE */ |
| 2176 |
|
| 2177 |
#if defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG |
| 2178 |
|
| 2179 |
gboolean |
| 2180 |
qmi_message_pdc_set_selected_config_input_get_type_with_id ( |
| 2181 |
QmiMessagePdcSetSelectedConfigInput *self, |
| 2182 |
QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2183 |
GError **error) |
| 2184 |
{ |
| 2185 |
QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; |
| 2186 |
GArray *id = NULL; |
| 2187 |
|
| 2188 |
if (!qmi_message_pdc_set_selected_config_input_get_type_with_id_v2 (self, &config_type, &id, error)) |
| 2189 |
return FALSE; |
| 2190 |
if (value_type_with_id) { |
| 2191 |
value_type_with_id->config_type = config_type; |
| 2192 |
value_type_with_id->id = id; |
| 2193 |
} |
| 2194 |
return TRUE; |
| 2195 |
} |
| 2196 |
|
| 2197 |
gboolean |
| 2198 |
qmi_message_pdc_set_selected_config_input_set_type_with_id ( |
| 2199 |
QmiMessagePdcSetSelectedConfigInput *self, |
| 2200 |
const QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2201 |
GError **error) |
| 2202 |
{ |
| 2203 |
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); |
| 2204 |
} |
| 2205 |
|
| 2206 |
#endif /* HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG */ |
| 2207 |
|
| 2208 |
#if defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO |
| 2209 |
|
| 2210 |
gboolean |
| 2211 |
qmi_message_pdc_get_config_info_input_get_type_with_id ( |
| 2212 |
QmiMessagePdcGetConfigInfoInput *self, |
| 2213 |
QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2214 |
GError **error) |
| 2215 |
{ |
| 2216 |
QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; |
| 2217 |
GArray *id = NULL; |
| 2218 |
|
| 2219 |
if (!qmi_message_pdc_get_config_info_input_get_type_with_id_v2 (self, &config_type, &id, error)) |
| 2220 |
return FALSE; |
| 2221 |
if (value_type_with_id) { |
| 2222 |
value_type_with_id->config_type = config_type; |
| 2223 |
value_type_with_id->id = id; |
| 2224 |
} |
| 2225 |
return TRUE; |
| 2226 |
} |
| 2227 |
|
| 2228 |
gboolean |
| 2229 |
qmi_message_pdc_get_config_info_input_set_type_with_id ( |
| 2230 |
QmiMessagePdcGetConfigInfoInput *self, |
| 2231 |
const QmiDeprecatedConfigTypeAndId *value_type_with_id, |
| 2232 |
GError **error) |
| 2233 |
{ |
| 2234 |
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); |
| 2235 |
} |
| 2236 |
|
| 2237 |
#endif /* HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */ |
| 2238 |
|
| 2239 |
#if defined HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE |
| 2240 |
|
| 2241 |
gboolean |
| 2242 |
qmi_message_dms_delete_stored_image_input_get_image ( |
| 2243 |
QmiMessageDmsDeleteStoredImageInput *self, |
| 2244 |
QmiDeprecatedMessageDmsDeleteStoredImageInputImage *value_image, |
| 2245 |
GError **error) |
| 2246 |
{ |
| 2247 |
QmiDmsFirmwareImageType type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; |
| 2248 |
GArray *unique_id = NULL; |
| 2249 |
const gchar *build_id = NULL; |
| 2250 |
|
| 2251 |
if (!qmi_message_dms_delete_stored_image_input_get_image_details (self, &type, &unique_id, &build_id, error)) |
| 2252 |
return FALSE; |
| 2253 |
if (value_image) { |
| 2254 |
value_image->type = type; |
| 2255 |
value_image->unique_id = unique_id; |
| 2256 |
value_image->build_id = (gchar *) build_id; |
| 2257 |
} |
| 2258 |
return TRUE; |
| 2259 |
} |
| 2260 |
|
| 2261 |
gboolean |
| 2262 |
qmi_message_dms_delete_stored_image_input_set_image ( |
| 2263 |
QmiMessageDmsDeleteStoredImageInput *self, |
| 2264 |
const QmiDeprecatedMessageDmsDeleteStoredImageInputImage *value_image, |
| 2265 |
GError **error) |
| 2266 |
{ |
| 2267 |
return qmi_message_dms_delete_stored_image_input_set_image_details (self, value_image->type, value_image->unique_id, value_image->build_id, error); |
| 2268 |
} |
| 2269 |
|
| 2270 |
#endif /* HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE */ |
| 2271 |
|
| 2272 |
#if defined HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO |
| 2273 |
|
| 2274 |
gboolean |
| 2275 |
qmi_message_dms_get_stored_image_info_input_get_image ( |
| 2276 |
QmiMessageDmsGetStoredImageInfoInput *self, |
| 2277 |
QmiDeprecatedMessageDmsGetStoredImageInfoInputImage *value_image, |
| 2278 |
GError **error) |
| 2279 |
{ |
| 2280 |
QmiDmsFirmwareImageType type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; |
| 2281 |
GArray *unique_id = NULL; |
| 2282 |
const gchar *build_id = NULL; |
| 2283 |
|
| 2284 |
if (!qmi_message_dms_get_stored_image_info_input_get_image_details (self, &type, &unique_id, &build_id, error)) |
| 2285 |
return FALSE; |
| 2286 |
if (value_image) { |
| 2287 |
value_image->type = type; |
| 2288 |
value_image->unique_id = unique_id; |
| 2289 |
value_image->build_id = (gchar *) build_id; |
| 2290 |
} |
| 2291 |
return TRUE; |
| 2292 |
} |
| 2293 |
|
| 2294 |
gboolean |
| 2295 |
qmi_message_dms_get_stored_image_info_input_set_image ( |
| 2296 |
QmiMessageDmsGetStoredImageInfoInput *self, |
| 2297 |
const QmiDeprecatedMessageDmsGetStoredImageInfoInputImage *value_image, |
| 2298 |
GError **error) |
| 2299 |
{ |
| 2300 |
return qmi_message_dms_get_stored_image_info_input_set_image_details (self, value_image->type, value_image->unique_id, value_image->build_id, error); |
| 2301 |
} |
| 2302 |
|
| 2303 |
#endif /* HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO */ |
| 2304 |
|
| 2305 |
#if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT |
| 2306 |
|
| 2307 |
gboolean |
| 2308 |
qmi_indication_loc_position_report_output_get_dilution_of_precision ( |
| 2309 |
QmiIndicationLocPositionReportOutput *self, |
| 2310 |
QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision *value_dilution_of_precision, |
| 2311 |
GError **error) |
| 2312 |
{ |
| 2313 |
gfloat pdop = 0.0; |
| 2314 |
gfloat hdop = 0.0; |
| 2315 |
gfloat vdop = 0.0; |
| 2316 |
|
| 2317 |
if (!qmi_indication_loc_position_report_output_get_dop (self, &pdop, &hdop, &vdop, error)) |
| 2318 |
return FALSE; |
| 2319 |
if (value_dilution_of_precision) { |
| 2320 |
value_dilution_of_precision->position_dilution_of_precision = pdop; |
| 2321 |
value_dilution_of_precision->horizontal_dilution_of_precision = hdop; |
| 2322 |
value_dilution_of_precision->vertical_dilution_of_precision = vdop; |
| 2323 |
} |
| 2324 |
return TRUE; |
| 2325 |
} |
| 2326 |
|
| 2327 |
gboolean |
| 2328 |
qmi_indication_loc_position_report_output_get_gps_time ( |
| 2329 |
QmiIndicationLocPositionReportOutput *self, |
| 2330 |
QmiDeprecatedIndicationLocPositionReportOutputGpsTime *value_gps_time, |
| 2331 |
GError **error) |
| 2332 |
{ |
| 2333 |
guint16 gps_weeks = 0; |
| 2334 |
guint32 gps_time_of_week_milliseconds = 0; |
| 2335 |
|
| 2336 |
if (!qmi_indication_loc_position_report_output_get_gps_date_time (self, &gps_weeks, &gps_time_of_week_milliseconds, error)) |
| 2337 |
return FALSE; |
| 2338 |
if (value_gps_time) { |
| 2339 |
value_gps_time->gps_weeks = gps_weeks; |
| 2340 |
value_gps_time->gps_time_of_week_milliseconds = gps_time_of_week_milliseconds; |
| 2341 |
} |
| 2342 |
return TRUE; |
| 2343 |
} |
| 2344 |
|
| 2345 |
#endif /* HAVE_QMI_INDICATION_LOC_POSITION_REPORT */ |
| 2346 |
|
| 2347 |
#if defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS |
| 2348 |
|
| 2349 |
typedef struct { |
| 2350 |
GArray *slot_eid_information; |
| 2351 |
} MessageUimGetSlotStatusOutputCompatContext; |
| 2352 |
|
| 2353 |
static void |
| 2354 |
message_uim_get_slot_status_output_clear_slot_eid_information (GArray *array) |
| 2355 |
{ |
| 2356 |
guint i; |
| 2357 |
|
| 2358 |
for (i = 0; i < array->len; i++) |
| 2359 |
g_array_unref (g_array_index (array, GArray *, i)); |
| 2360 |
g_array_unref (array); |
| 2361 |
} |
| 2362 |
|
| 2363 |
static void |
| 2364 |
message_uim_get_slot_status_output_compat_context_free (MessageUimGetSlotStatusOutputCompatContext *ctx) |
| 2365 |
{ |
| 2366 |
if (ctx->slot_eid_information) |
| 2367 |
message_uim_get_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); |
| 2368 |
g_slice_free (MessageUimGetSlotStatusOutputCompatContext, ctx); |
| 2369 |
} |
| 2370 |
|
| 2371 |
static MessageUimGetSlotStatusOutputCompatContext * |
| 2372 |
message_uim_get_slot_status_output_get_compat_context (QmiMessageUimGetSlotStatusOutput *self) |
| 2373 |
{ |
| 2374 |
MessageUimGetSlotStatusOutputCompatContext *ctx; |
| 2375 |
|
| 2376 |
ctx = qmi_message_uim_get_slot_status_output_get_compat_context (self); |
| 2377 |
if (!ctx) { |
| 2378 |
ctx = g_slice_new0 (MessageUimGetSlotStatusOutputCompatContext); |
| 2379 |
qmi_message_uim_get_slot_status_output_set_compat_context (self, ctx, (GDestroyNotify)message_uim_get_slot_status_output_compat_context_free); |
| 2380 |
} |
| 2381 |
|
| 2382 |
return ctx; |
| 2383 |
} |
| 2384 |
|
| 2385 |
gboolean |
| 2386 |
qmi_message_uim_get_slot_status_output_get_slot_eid_information ( |
| 2387 |
QmiMessageUimGetSlotStatusOutput *self, |
| 2388 |
GArray **value_slot_eid_information, |
| 2389 |
GError **error) |
| 2390 |
{ |
| 2391 |
GArray *slot_eid = NULL; |
| 2392 |
|
| 2393 |
if (!qmi_message_uim_get_slot_status_output_get_slot_eid (self, &slot_eid, error)) |
| 2394 |
return FALSE; |
| 2395 |
|
| 2396 |
if (value_slot_eid_information) { |
| 2397 |
MessageUimGetSlotStatusOutputCompatContext *ctx; |
| 2398 |
guint i; |
| 2399 |
|
| 2400 |
ctx = message_uim_get_slot_status_output_get_compat_context (self); |
| 2401 |
|
| 2402 |
if (ctx->slot_eid_information) |
| 2403 |
message_uim_get_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); |
| 2404 |
ctx->slot_eid_information = g_array_sized_new (FALSE, FALSE, sizeof (GArray *), slot_eid->len); |
| 2405 |
|
| 2406 |
for (i = 0; i < slot_eid->len; i++) { |
| 2407 |
QmiSlotEidElement *element; |
| 2408 |
GArray *aux; |
| 2409 |
|
| 2410 |
element = &g_array_index (slot_eid, QmiSlotEidElement, i); |
| 2411 |
aux = g_array_ref (element->eid); |
| 2412 |
g_array_append_val (ctx->slot_eid_information, aux); |
| 2413 |
} |
| 2414 |
|
| 2415 |
*value_slot_eid_information = ctx->slot_eid_information; |
| 2416 |
} |
| 2417 |
return TRUE; |
| 2418 |
} |
| 2419 |
|
| 2420 |
#endif /* HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS */ |
| 2421 |
|
| 2422 |
#if defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS |
| 2423 |
|
| 2424 |
typedef struct { |
| 2425 |
GArray *slot_eid_information; |
| 2426 |
} IndicationUimSlotStatusOutputCompatContext; |
| 2427 |
|
| 2428 |
static void |
| 2429 |
indication_uim_slot_status_output_clear_slot_eid_information (GArray *array) |
| 2430 |
{ |
| 2431 |
guint i; |
| 2432 |
|
| 2433 |
for (i = 0; i < array->len; i++) |
| 2434 |
g_array_unref (g_array_index (array, GArray *, i)); |
| 2435 |
g_array_unref (array); |
| 2436 |
} |
| 2437 |
|
| 2438 |
static void |
| 2439 |
indication_uim_slot_status_output_compat_context_free (IndicationUimSlotStatusOutputCompatContext *ctx) |
| 2440 |
{ |
| 2441 |
if (ctx->slot_eid_information) |
| 2442 |
indication_uim_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); |
| 2443 |
g_slice_free (IndicationUimSlotStatusOutputCompatContext, ctx); |
| 2444 |
} |
| 2445 |
|
| 2446 |
static IndicationUimSlotStatusOutputCompatContext * |
| 2447 |
indication_uim_slot_status_output_get_compat_context (QmiIndicationUimSlotStatusOutput *self) |
| 2448 |
{ |
| 2449 |
IndicationUimSlotStatusOutputCompatContext *ctx; |
| 2450 |
|
| 2451 |
ctx = qmi_indication_uim_slot_status_output_get_compat_context (self); |
| 2452 |
if (!ctx) { |
| 2453 |
ctx = g_slice_new0 (IndicationUimSlotStatusOutputCompatContext); |
| 2454 |
qmi_indication_uim_slot_status_output_set_compat_context (self, ctx, (GDestroyNotify)indication_uim_slot_status_output_compat_context_free); |
| 2455 |
} |
| 2456 |
|
| 2457 |
return ctx; |
| 2458 |
} |
| 2459 |
|
| 2460 |
gboolean |
| 2461 |
qmi_indication_uim_slot_status_output_get_slot_eid_information ( |
| 2462 |
QmiIndicationUimSlotStatusOutput *self, |
| 2463 |
GArray **value_slot_eid_information, |
| 2464 |
GError **error) |
| 2465 |
{ |
| 2466 |
GArray *slot_eid = NULL; |
| 2467 |
|
| 2468 |
if (!qmi_indication_uim_slot_status_output_get_slot_eid (self, &slot_eid, error)) |
| 2469 |
return FALSE; |
| 2470 |
|
| 2471 |
if (value_slot_eid_information) { |
| 2472 |
IndicationUimSlotStatusOutputCompatContext *ctx; |
| 2473 |
guint i; |
| 2474 |
|
| 2475 |
ctx = indication_uim_slot_status_output_get_compat_context (self); |
| 2476 |
|
| 2477 |
if (ctx->slot_eid_information) |
| 2478 |
indication_uim_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); |
| 2479 |
|
| 2480 |
ctx->slot_eid_information = g_array_sized_new (FALSE, FALSE, sizeof (GArray *), slot_eid->len); |
| 2481 |
for (i = 0; i < slot_eid->len; i++) { |
| 2482 |
QmiSlotEidElement *element; |
| 2483 |
GArray *aux; |
| 2484 |
|
| 2485 |
element = &g_array_index (slot_eid, QmiSlotEidElement, i); |
| 2486 |
aux = g_array_ref (element->eid); |
| 2487 |
g_array_append_val (ctx->slot_eid_information, aux); |
| 2488 |
} |
| 2489 |
|
| 2490 |
*value_slot_eid_information = ctx->slot_eid_information; |
| 2491 |
} |
| 2492 |
return TRUE; |
| 2493 |
} |
| 2494 |
|
| 2495 |
#endif /* HAVE_QMI_INDICATION_UIM_SLOT_STATUS */ |
| 2496 |
|
| 2497 |
#if defined HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION |
| 2498 |
|
| 2499 |
typedef struct { |
| 2500 |
GArray *personalization_status_other_slots; |
| 2501 |
} MessageUimGetConfigurationOutputCompatContext; |
| 2502 |
|
| 2503 |
static void |
| 2504 |
message_uim_get_configuration_output_clear_personalization_status_other_slots (GArray *array) |
| 2505 |
{ |
| 2506 |
guint i; |
| 2507 |
|
| 2508 |
for (i = 0; i < array->len; i++) |
| 2509 |
g_array_unref (g_array_index (array, GArray *, i)); |
| 2510 |
g_array_unref (array); |
| 2511 |
} |
| 2512 |
|
| 2513 |
static void |
| 2514 |
message_uim_get_configuration_output_compat_context_free (MessageUimGetConfigurationOutputCompatContext *ctx) |
| 2515 |
{ |
| 2516 |
if (ctx->personalization_status_other_slots) |
| 2517 |
message_uim_get_configuration_output_clear_personalization_status_other_slots (ctx->personalization_status_other_slots); |
| 2518 |
g_slice_free (MessageUimGetConfigurationOutputCompatContext, ctx); |
| 2519 |
} |
| 2520 |
|
| 2521 |
static MessageUimGetConfigurationOutputCompatContext * |
| 2522 |
message_uim_get_configuration_output_get_compat_context (QmiMessageUimGetConfigurationOutput *self) |
| 2523 |
{ |
| 2524 |
MessageUimGetConfigurationOutputCompatContext *ctx; |
| 2525 |
|
| 2526 |
ctx = qmi_message_uim_get_configuration_output_get_compat_context (self); |
| 2527 |
if (!ctx) { |
| 2528 |
ctx = g_slice_new0 (MessageUimGetConfigurationOutputCompatContext); |
| 2529 |
qmi_message_uim_get_configuration_output_set_compat_context (self, ctx, (GDestroyNotify)message_uim_get_configuration_output_compat_context_free); |
| 2530 |
} |
| 2531 |
|
| 2532 |
return ctx; |
| 2533 |
} |
| 2534 |
|
| 2535 |
gboolean |
| 2536 |
qmi_message_uim_get_configuration_output_get_personalization_status_other_slots ( |
| 2537 |
QmiMessageUimGetConfigurationOutput *self, |
| 2538 |
GArray **value_personalization_status_other_slots, |
| 2539 |
GError **error) |
| 2540 |
{ |
| 2541 |
GArray *array = NULL; |
| 2542 |
|
| 2543 |
if (!qmi_message_uim_get_configuration_output_get_personalization_status_other (self, &array, error)) |
| 2544 |
return FALSE; |
| 2545 |
|
| 2546 |
if (value_personalization_status_other_slots) { |
| 2547 |
MessageUimGetConfigurationOutputCompatContext *ctx; |
| 2548 |
guint i; |
| 2549 |
|
| 2550 |
ctx = message_uim_get_configuration_output_get_compat_context (self); |
| 2551 |
|
| 2552 |
if (ctx->personalization_status_other_slots) |
| 2553 |
message_uim_get_configuration_output_clear_personalization_status_other_slots (ctx->personalization_status_other_slots); |
| 2554 |
|
| 2555 |
ctx->personalization_status_other_slots = g_array_sized_new (FALSE, FALSE, sizeof (GArray *), array->len); |
| 2556 |
|
| 2557 |
|
| 2558 |
for (i = 0; i < array->len; i++) { |
| 2559 |
QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElement *element; |
| 2560 |
GArray *aux; |
| 2561 |
|
| 2562 |
element = &g_array_index (array, QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElement, i); |
| 2563 |
|
| 2564 |
/* We can do this because QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElementSlotElement (the new type) |
| 2565 |
* and QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement (the old type) are equivalent */ |
| 2566 |
aux = g_array_ref (element->slot); |
| 2567 |
g_array_append_val (ctx->personalization_status_other_slots, aux); |
| 2568 |
} |
| 2569 |
|
| 2570 |
*value_personalization_status_other_slots = ctx->personalization_status_other_slots; |
| 2571 |
} |
| 2572 |
return TRUE; |
| 2573 |
} |
| 2574 |
|
| 2575 |
#endif /* HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION */ |
| 2576 |
|
| 2577 |
#if defined HAVE_QMI_INDICATION_WDS_SET_LTE_ATTACH_PDN_LIST |
| 2578 |
|
| 2579 |
gboolean |
| 2580 |
qmi_indication_wds_set_lte_attach_pdn_list_output_get_result ( |
| 2581 |
QmiIndicationWdsSetLteAttachPdnListOutput *self, |
| 2582 |
GError **error) |
| 2583 |
{ |
| 2584 |
/* NO-OP */ |
| 2585 |
return TRUE; |
| 2586 |
} |
| 2587 |
|
| 2588 |
#endif /* HAVE_QMI_INDICATION_WDS_SET_LTE_ATTACH_PDN_LIST */ |
| 2589 |
|
| 2590 |
/*****************************************************************************/ |
| 2591 |
|
| 2592 |
GType |
| 2593 |
qmi_wds_get_current_settings_requested_settings_get_type (void) |
| 2594 |
{ |
| 2595 |
return qmi_wds_requested_settings_get_type (); |
| 2596 |
} |
| 2597 |
|
| 2598 |
gchar * |
| 2599 |
qmi_wds_get_current_settings_requested_settings_build_string_from_mask (QmiDeprecatedWdsGetCurrentSettingsRequestedSettings mask) |
| 2600 |
{ |
| 2601 |
return qmi_wds_requested_settings_build_string_from_mask ((QmiWdsRequestedSettings)mask); |
| 2602 |
} |
| 2603 |
|
| 2604 |
/*****************************************************************************/ |
| 2605 |
|
| 2606 |
#if defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS |
| 2607 |
|
| 2608 |
GType |
| 2609 |
qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_get_type (void) |
| 2610 |
{ |
| 2611 |
return qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_v2_get_type (); |
| 2612 |
} |
| 2613 |
|
| 2614 |
#endif /* HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS */ |
| 2615 |
|
| 2616 |
/*****************************************************************************/ |
| 2617 |
|
| 2618 |
#if defined HAVE_QMI_INDICATION_UIM_CARD_STATUS |
| 2619 |
|
| 2620 |
GType |
| 2621 |
qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_get_type (void) |
| 2622 |
{ |
| 2623 |
return qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_v2_get_type (); |
| 2624 |
} |
| 2625 |
|
| 2626 |
#endif /* HAVE_QMI_INDICATION_UIM_CARD_STATUS */ |
| 2627 |
|
| 2628 |
#endif /* QMI_DISABLE_DEPRECATED */ |