aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux
Commit message (Collapse)AuthorAgeFilesLines
* qmi-codegen: port client code generation to use GTaskBen Chan2017-04-181-30/+17
|
* libqmi-glib: fix enum nicknames with '3gpp' on itAleksander Morgado2017-03-011-1/+2
|
* build: update copyright yearsAleksander Morgado2017-02-1015-3/+16
|
* docs: update enums, flags and errors documentationAleksander Morgado2017-02-105-26/+35
|
* data: specify 'since' tags for all messages and TLVsAleksander Morgado2017-02-106-10/+13
|
* libqmi,codegen: allow specifying 'since' tags for each message and TLVAleksander Morgado2017-02-105-82/+133
| | | | | The 'since' tag specifies in which major stable version the given message or TLV was introduced.
* libqmi-glib: support vendor-specific request/responsesAleksander Morgado2017-01-293-26/+110
| | | | | | | | | | | | | | We want to support non-standard messages that may be encoded with different TLVs depending on how the vendor implemented them. Anyway, right now this is really just to support the correct translation of TLVs and message contents in the get_printable() methods. The support is only included for QMI request/responses, and not for QMI indications. This is because the library knows in which moment the requests are created (and can apply the same rules to the matched response when it is received). For the indications, though, there is no such context configurable yet.
* qmi-codegen: minor indentation fix in generated codeAleksander Morgado2017-01-231-2/+2
|
* qmi-codegen: allow fields to be hidden with 'visible':'no'Dan Williams2016-10-066-0/+95
| | | | | We want to mark some TLV fields as reserved and not exposed through the public API due to alignment or other issues.
* qmi-codegen: fixed multiple common-refs processingAliaksandr Barouski2016-09-051-3/+5
|
* qmicli: fix --dms-get-band-capabilities output on 32-bit platformsReinhard Speyerer2016-03-201-1/+1
| | | | | | | | | | | The @enum_name@_build_string_from_mask template in qmi-flags64-types-template.c uses a local gulong number variable. On platforms where sizeof(gulong) < sizeof(Qmi*BandCapability) this may cause bands to be missing from qmicli output or incorrect bands to be contained in the output. Replace gulong number with guint64 number to fix this. Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
* qmi-codegen: fix too-small transaction id in internal message codeDan Williams2016-02-101-1/+1
| | | | | | Found by John. https://bugs.freedesktop.org/show_bug.cgi?id=94083
* qmi-codegen: avoid variable names like 'new'Aleksander Morgado2015-08-021-2/+2
| | | | | | | | | | | For C++ compatibility, we should not generate variables with the names of protected C++ keywords, like 'new'. Currently this was happening in the "DMS Set Service Programming Code" method, where we had a TLV named "New". Instead of renaming the TLV, which would change the name of the getter method as well, we will force prepending the "value_" string to the variable names of the getter and setter methods. https://bugs.freedesktop.org/show_bug.cgi?id=91479
* qmi-codegen: require Service set for a correct Client definitionAleksander Morgado2015-01-251-1/+3
|
* qmi-codegen: update copyright of built filesAleksander Morgado2015-01-111-0/+1
|
* qmi-codegen: avoid breaking API when defining strings in public structsAleksander Morgado2015-01-113-6/+53
| | | | | | | | | | Commit b9c3701e337198 introduced an API break, where we would change a pointer to a heap allocated string and instead use a fixed size char array. This commit will instead recover the pointer to the string when used in a public struct, so that API isn't broken w.r.t. previous stable libqmi versions. The string is now properly allocated before reading and deallocated as part of the struct deallocation.
* qmi-codegen: fix printing contents of structs with fixed sized stringsAleksander Morgado2014-12-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the fixed sized string contains no characters or is shorter than the explicit size, NUL bytes will be included. If we try to append exactly the size of the string, we'll end up with embedded NULs in our string to print, so the actual output will be cut, even if the string is longer after the embedded NUL bytes. E.g.: >>>>>> TLV: >>>>>> type = "GERAN Info" (0x10) >>>>>> length = 61 >>>>>> value = 00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:28:00:03:7D:6F:00:00:32:F4:51:B3:00:4D:00:11:2A:00:8A:3C:00:00:32:F4:51:B3:00:63:00:30:14:00:89:3C:00:00:32:F4:51:B3:00:59:00:11:0D:00 >>>>>> translated = [ cell_id = '0' plmn = ' With this fix, we avoid this by explicitly finishing ourselves the fixed sized string with a NUL byte, and then adding the C string as the non-fixed sized ones, i.e. until the first NUL byte is found. E.g.: >>>>>> TLV: >>>>>> type = "GERAN Info" (0x10) >>>>>> length = 61 >>>>>> value = 00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:28:00:03:7D:6F:00:00:32:F4:51:B3:00:4D:00:11:2A:00:8A:3C:00:00:32:F4:51:B3:00:63:00:30:14:00:89:3C:00:00:32:F4:51:B3:00:59:00:11:0D:00 >>>>>> translated = [ cell_id = '0' plmn = '' lac = '0' geran_absolute_rf_channel_number = '0' base_station_identity_code = '0' timing_advance = '4294967295' rx_level = '40' cell = '{ [0] = '[ cell_id = '28541' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '77' base_station_identity_code = '17' rx_level = '42' ] ' [1] = '[ cell_id = '15498' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '99' base_station_identity_code = '48' rx_level = '20' ] ' [2] = '[ cell_id = '15497' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '89' base_station_identity_code = '17' rx_level = '13' ] '}' ]
* qmi-codegen: fix public struct type generationAleksander Morgado2014-12-127-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change triggers an API break. When building structs to be included in the public header, we were just relying on using the 'public_format' of each variable. This is an error, as the variable may be more complex than just public/private. E.g. could be another struct, or an array, or a fixed sized string, as in the example. In particular, this bug currently affects one public type, where one of its elements changes from being just a pointer to a string to a fixed sized array of 4 bytes. The following type is changed from: typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement { guint32 cell_id; gchar * plmn; guint16 lac; guint16 geran_absolute_rf_channel_number; guint8 base_station_identity_code; guint16 rx_level; } QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement; To: typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement { guint32 cell_id; gchar plmn[4]; guint16 lac; guint16 geran_absolute_rf_channel_number; guint8 base_station_identity_code; guint16 rx_level; } QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement; Thanks to Joseba Sanjuan <joseba.sanjuan@gmail.com> for finding the bug.
* qmi-codegen: don't mark missing optional TLVs as setDan Williams2014-11-211-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the optional TLV case, 'tlv_error' was never set to TRUE when the optional TLV was missing, because the return value of qmi_message_tlv_read_init() was ignored. This caused "self->arg_*_set" to always be TRUE and NULL strings to be returned to callers requesting the TLV value later. Also prevent incorrect "Left X bytes unread when getting..." messages caused when the TLV is missing. This bug was found when probing a modem that does not return an MEID TLV to DMSGetIds (because it is GSM/UMTS/LTE only), but qmi_message_dms_get_ids_output_get_meid() returned TRUE and a NULL 'str': if (qmi_message_dms_get_ids_output_get_meid (output, &str, NULL) && --> str[0] != '\0' && str[0] != '0') { Bug introduced in b143b7f6 (qmi-codegen: use the new TLV reader API). Before: ======= gsize offset = 0; gsize init_offset; gboolean tlv_error = FALSE; init_offset = qmi_message_tlv_read_init (message, QMI_INDICATION_DMS_EVENT_REPORT_OUTPUT_TLV_POWER_STATE, NULL, NULL); <<<snip>>> /* The remaining size of the buffer needs to be 0 if we successfully read the TLV */ if ((offset = __qmi_message_tlv_read_remaining_size (message, init_offset, offset)) > 0) { g_warning ("Left '%" G_GSIZE_FORMAT "' bytes unread when getting the 'Power State' TLV", offset); } qmi_indication_dms_event_report_output_power_state_out: if (!tlv_error) self->arg_power_state_set = TRUE; After: ====== gsize offset = 0; gsize init_offset; if ((init_offset = qmi_message_tlv_read_init (message, QMI_INDICATION_DMS_EVENT_REPORT_OUTPUT_TLV_POWER_STATE, NULL, NULL)) == 0) { goto qmi_indication_dms_event_report_output_power_state_out; } <<<snip>>> /* The remaining size of the buffer needs to be 0 if we successfully read the TLV */ if ((offset = __qmi_message_tlv_read_remaining_size (message, init_offset, offset)) > 0) { g_warning ("Left '%" G_GSIZE_FORMAT "' bytes unread when getting the 'Power State' TLV", offset); } self->arg_power_state_set = TRUE; qmi_indication_dms_event_report_output_power_state_out: ;
* qmi-codegen: use the new TLV reader APIAleksander Morgado2014-11-097-409/+134
|
* qmi-codegen: use the new TLV builder APIAleksander Morgado2014-11-098-111/+71
|
* qmi-codegen: make sure expected len is 4 bytesAleksander Morgado2014-10-081-1/+1
| | | | Suggested by Thomas Haller <thaller@redhat.com>.
* qmi-codegen: error out if invalid array size element in JSONAleksander Morgado2014-10-081-1/+1
| | | | Suggested by Thomas Haller <thaller@redhat.com>.
* qmi-codegen: avoid buffer overlow in emit_input_tlv_add()Thomas Haller2014-10-087-28/+77
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1031738 Reported-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* qmi-codegen: ensure enough buffer available to read string/array size variableAleksander Morgado2014-10-083-4/+28
| | | | | | | | | | | | Code generation via emit_size_read() creates the _validate() functions. The generated code for strings and arrays used to read the length prefix without checking that the provided buffer is large enough. https://bugzilla.redhat.com/show_bug.cgi?id=1031738 Patch based on a patch from Thomas Haller <thaller@redhat.com> Reported-by: Florian Weimer <fweimer@redhat.com>
* nas: consolidate variable namesAleksander Morgado2014-05-281-1/+1
|
* qmi-codegen: handle 'gfloat' typesAleksander Morgado2014-05-283-5/+23
|
* build-aux,qmi-codegen: explicitly state which services have flags64Aleksander Morgado2014-02-171-2/+2
| | | | ... not the other way around.
* oma: setup generation of the OMA service supportAleksander Morgado2013-09-041-2/+2
|
* uim: integrate the UIM serviceAleksander Morgado2013-09-021-2/+2
| | | | Also implement "Reset" and "Read Record" request/response.
* qmi-codegen: allow handling built-in sequence numbers in arraysAleksander Morgado2013-07-151-22/+125
| | | | | | | | | | TLVs are really limited in size, so if you want to have truly long data passed between host and modem, you may end up needing multiple QMI messages where the long TLV is split in segments. Currently support this by handling a built-in sequence number expected to be found between the array size prefix and the array itself (see e.g. TLV 0x13 (PRL) in 'DMS Activate Manual'). This sequence number can be enabled with the new 'sequence-prefix-format' keyword in the array definition.
* pbm: setup generation of the PBM service supportAleksander Morgado2013-07-041-2/+2
| | | | Only 'Indication Register' message for now.
* dms: activation code string needs explicit 1-byte length prefixAleksander Morgado2013-03-071-5/+5
| | | | Reported by Arman Uguray <armansito@google.com>
* qmi-codegen: clean up compiled python filesMarius Kotsbak2012-12-241-0/+2
| | | | | These caused problems for deb packaging, as their content depends on the Python version used.
* qmi-codegen python3: change string.lower(str) to str.lower()Shawn J. Goff2012-12-171-2/+2
| | | | | | | The string.lower(str) class method is no longer available. sed regex: s/string\.lower(\(.*\))/\1.lower()/
* qmi-codegen python3: fix dict.has_key('key') to 'key' in dictShawn J. Goff2012-12-171-1/+1
| | | | | | | Python 3 no longer supports the has_key() method. sed regex: s/\([^ ]\+\)\.has_key(\([^)]*\))/\2 in \1/g
* qmi-codegen python3: change string.replace() class method use to ↵Shawn J. Goff2012-12-173-8/+7
| | | | | | | | | | str.replace() instance method Python 3 doesn't support the replace class method; it's now an instance method only. string.replace(object, old, new) changes to object.replace(old, new) sed: s/string\.replace(\([^,]*\), /\1.replace(/
* qmi-codegen: fix some python3 compatibility issuesDan Williams2012-12-175-14/+14
| | | | Simple methods are no longer in the string module.
* qmi-codegen: translate the values of enums/flags in tracesAleksander Morgado2012-11-025-27/+52
|
* qmi-codegen: fix computation of expected TLV length when using stringsAleksander Morgado2012-11-021-2/+2
|
* qmi-codegen: validate TLV before really reading itAleksander Morgado2012-10-3010-23/+220
| | | | | | | | | | Try to handle buggy firmware, or just make the library more robust, by validating the read TLV before really reading it. If a TLV is not considered valid, we just skip it for now. E.g.: the "Detailed Service Status" TLV (0x21) in the "NAS Get Serving System" message is supposed to be a sequence of 5 bytes, but some models (e.g. ZTE MF683) end up sending only the first 4 bytes.
* libqmi-glib,utils: no need to pass endianness when reading/writing single bytesAleksander Morgado2012-10-291-10/+25
|
* libqmi-glib,qmi-codegen: add endian-ness annotation capabilityDan Williams2012-10-233-4/+25
| | | | | | | | Some values are sent by the firmware in big endian byte order, specifically IP addresses, which are sent in network byte order (ie, big endian). Add the ability to specify the byte order the firmware handles the value as, and convert that to host byte order when reading/writing QMI buffers.
* libqmi-glib,qmi-codegen: cancelled operations will issue an ABORT messageAleksander Morgado2012-10-101-1/+2
| | | | | | We allow passing a GCancellable to every async operation with the clients. Now, if the cancellable gets cancelled and the operation can be ABORT-ed, then we do it.
* libqmi-glib,qmi-codegen: timed out operations will issue an ABORT messageAleksander Morgado2012-10-104-40/+147
| | | | | | | | | Messages can now be tagged with a special 'abort' keyword, so that whenever the message times out we issue a new ABORT command to cancel the specific timed out request. This support is currently only available for the NAS and WDS services, which are the ones supporting ABORT for their long-running operations.
* libqmi-glib,utils: make qmi_utils_str_hex() private to the libraryAleksander Morgado2012-10-091-1/+1
|
* qmi-codegen: make internal get_printable() and get_version_introduced()Aleksander Morgado2012-10-091-20/+18
| | | | These methods are (should only be) used only by the library.
* docs: improve documentation of enums, flags and errorsAleksander Morgado2012-10-093-12/+38
|
* qmi-codegen: request creator and response/indication parsers are privateAleksander Morgado2012-10-092-46/+8
|
* libqmi-glib: completely hide the implicit CTL Client in the APIAleksander Morgado2012-10-091-11/+14
|