aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/qmi-codegen/VariableSequence.py
Commit message (Collapse)AuthorAgeFilesLines
* build: update copyright yearsAleksander Morgado2017-02-101-0/+1
|
* data: specify 'since' tags for all messages and TLVsAleksander Morgado2017-02-101-2/+2
|
* qmi-codegen: allow fields to be hidden with 'visible':'no'Dan Williams2016-10-061-0/+18
| | | | | We want to mark some TLV fields as reserved and not exposed through the public API due to alignment or other issues.
* qmi-codegen: fix public struct type generationAleksander Morgado2014-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: use the new TLV reader APIAleksander Morgado2014-11-091-18/+9
|
* qmi-codegen: use the new TLV builder APIAleksander Morgado2014-11-091-2/+2
|
* qmi-codegen: avoid buffer overlow in emit_input_tlv_add()Thomas Haller2014-10-081-2/+2
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1031738 Reported-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* nas: consolidate variable namesAleksander Morgado2014-05-281-1/+1
|
* qmi-codegen: validate TLV before really reading itAleksander Morgado2012-10-301-0/+8
| | | | | | | | | | 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.
* docs: improve generated `libqmi-glib' documentationAleksander Morgado2012-10-091-0/+9
| | | | | Among the tons of fixes done here, we now generate some per-service .sections file which we then concatenate to build the final libqmi-glib-sections.txt file.
* qmi-codegen: don't issue the array element clear function on 'Input' arraysAleksander Morgado2012-09-261-2/+4
| | | | | | | When an array is required to be passed in an input TLV, the user who created it is responsible for freeing it. Therefore, we should not dump the static array element clear function in these cases, or these unused methods will end up breaking the compilation.
* qmi-codegen: ensure helper methods get always generatedAleksander Morgado2012-09-241-0/+9
| | | | | | | | | For those variables which are containers of other variables (struct, sequence and array), ensure we call `emit_helper_methods()' in order to generate variable specific dispose() helpers and such. This fixes the case of nested arrays of structs (arrays of structs with arrays of structs whithin).
* qmi-codegen: new `sequence' variable typeAleksander Morgado2012-07-031-0/+195
The `sequence' variable types are defined in the same way as `struct' types, but the generated implementation is completely different: * Struct TLVs will generate public struct types, and the getter/setter methods will pass a single variable of that new struct type. * Sequence TLVs will not generate any new public nor private type. The getter and setter methods will pass N items, one for each member of the sequence. It should be safe to do so and maintain API/ABI compatibility afterwards, as existing TLVs are not expected to change.