summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* build-aux,codegen: generate GIR compat helpers for arrays of structsAleksander Morgado2022-03-0710-53/+1022
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original methods in libqmi-glib used GArrays of structs when it was required to return a collection of complex items. Some of these arrays of structs were so complex that contained inner arrays of other structs. Using these methods from C was no problem, but the automatic language binding support given by GObject Introspection isn't capable of using such complex arrays of structs. The simplest way forward is to switch those GArrays into GPtrArrays, so that we provide arrays of pointers to structs, instead of arrays of structs. This approach is fully supported right now by GIR, and doesn't give any additional problem. The new GIR compat method introduced are all suffixed with '_gir' in their names, and renamed to the original method name for the language binding. The original method names are explicitly flagged to be skipped by the bindings. E.g. the C method qmi_indication_uim_refresh_output_get_event() gets a new qmi_indication_uim_refresh_output_get_event_gir() compat method to be used by the bindings, and it's renamed to get_event() (without the _gir suffix) in the binding. If the structs contained other arrays of structs, new struct types using GPtrArray are also introduced, renamed with the 'Gir' suffix. E.g. the QmiMessageDmsListStoredImagesOutputListImage struct contains a GArray of QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement elements, while the new QmiMessageDmsListStoredImagesOutputListImageGir struct contains a GPtrArray of the same type of elements. The use of GArrays and GPtrArrays in APIs is really not recommended by GIR, but in our case they're always transfer-none and so there is no much risk in binding getting that wrong. Whenever we rework these APIs completely, we can think on making sure we provide a single set of methods to be used both in C and bindings, and avoiding GArrays and GPtrArrays at the same time. This change was not done right now in order to keep the change as minimum as possible (e.g. the methods using GArrays of simple structs or GArrays of strings or bytes were not changed to have GIR compat methods). Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/83
* libqmi-glib,compat: fix minor typo in documentationAleksander Morgado2022-03-021-1/+1
| | | | Extends the fix that was done in 03166f830e5ff70b581e6715af3bbfdd768b7677
* docs,reference: QmiWdsGetCurrentSettingsRequestedSettings is flagsAleksander Morgado2022-02-281-2/+2
| | | | | So publish the _build_string_from_mask() method in the API, not the _get_string() one.
* libqmi-glib,qmicli: new foxconn modem serviceFreedom Liu2022-02-2815-2/+405
|
* build: version bump to flag existence of new API (codegen related changes)Aleksander Morgado2022-02-281-1/+1
|
* libqmi-glib,compat: fix minor typo in documentationAleksander Morgado2022-02-271-1/+1
|
* build-aux,codegen: clear array method not neededAleksander Morgado2022-02-273-11/+0
| | | | | Seems to be a leftover from a previous iteration. This method is not required because we can no longer have arrays of arrays.
* build-aux,codegen: minor coding style fixAleksander Morgado2022-02-271-1/+1
|
* build-aux,codegen: no need to defined private/public format in arraysAleksander Morgado2022-02-271-3/+0
| | | | | We can no longer have arrays of arrays, so there is no point in defining these.
* build-aux,codegen: split variable declarations for bundles and structsAleksander Morgado2022-02-277-24/+56
|
* build-aux,codegen: remove doc fields from methods in variablesAleksander Morgado2022-02-275-203/+3
| | | | | Let's improve the main variable object documentation in one single place.
* build-aux,codegen: coding style changesAleksander Morgado2022-02-279-48/+55
|
* build-aux,codegen: 'Result' TLV doesn't apply in input bundlesAleksander Morgado2022-02-271-3/+0
|
* build-aux,codegen: sequence variable may need disposeAleksander Morgado2022-02-271-2/+2
| | | | Remove the TODO, because this is really required
* build-aux,codegen: 'sequence-prefix-format' unsupported with 'fixed-size' arraysAleksander Morgado2022-02-271-7/+11
|
* build-aux,codegen: remove emit_helper_methods()Aleksander Morgado2022-02-275-35/+0
| | | | No longer needed anywhere.
* build-aux,codegen: use per-type clear methodsAleksander Morgado2022-02-276-36/+52
| | | | | We create new clear methods for each struct type, plus additional generic clear methods for GArrays and strings.
* build-aux,codegen: emit_types() may update both hfile and cfileAleksander Morgado2022-02-266-16/+16
|
* build-aux,codegen: require explicit array length definitionAleksander Morgado2022-02-269-643/+714
| | | | | | Don't assume that if nothing given an size-prefix-format of 8 bits should be used; force the developer to provide a correct array size definition, either with size-prefix-format or fixed-size.
* build-aux,codegen: 'to' is always reference in getter implementationAleksander Morgado2022-02-266-33/+18
|
* libqmi-glib,compat: update copyright yearsAleksander Morgado2022-02-262-2/+2
|
* build-aux,codegen: disallow arrays of arrays, use an intermediate struct alwaysAleksander Morgado2022-02-261-0/+4
| | | | This is required since we're going to return C arrays in our API.
* qmicli,uim: use the new Other Slots getter without array of arraysAleksander Morgado2022-02-261-10/+12
|
* uim: avoid array of arrays in Personalization Status OtherAleksander Morgado2022-02-264-18/+145
|
* qmicli,uim: use the new Slot EID getter with QmiSlotEidElementAleksander Morgado2022-02-262-6/+8
|
* uim: avoid array of arrays in Slot EID InformationAleksander Morgado2022-02-263-11/+211
| | | | | We cannot do arrays of arrays when supporting the new GIR array compat methods in 1.32
* qmicli,loc: port to use the new APIs without QmiIndicationLoc...GpsTimeAleksander Morgado2022-02-261-3/+4
|
* qmicli,loc: port to use the new APIs without ↵Aleksander Morgado2022-02-261-5/+7
| | | | QmiIndicationLoc...DilutionOfPrecision
* qmicli,dms: port to use the new APIs without ↵Aleksander Morgado2022-02-261-5/+5
| | | | QmiMessageDmsGetStoredImageInfoInputImage
* qmicli,dms: port to use the new APIs without ↵Aleksander Morgado2022-02-261-24/+23
| | | | QmiMessageDmsDeleteStoredImageInputImage
* build-aux,codegen: no longer allow TLVs as structsAleksander Morgado2022-02-262-128/+6
| | | | | | | | The TLVs that have more than one item should be defined as sequences, not as structs, so that we can avoid any unneeded intermediate struct. The struct variable types will now exclusively be for array elements.
* loc: skip the need of the QmiIndicationLoc...GpsTime intermediate structAleksander Morgado2022-02-264-3/+63
|
* loc: skip the need of the QmiIndicationLoc...DilutionOfPrecision ↵Aleksander Morgado2022-02-264-6/+80
| | | | intermediate struct
* dms: skip the need of the QmiMessageDmsGetStoredImageInfoInputImage ↵Aleksander Morgado2022-02-264-3/+105
| | | | intermediate struct
* dms: skip the need of the QmiMessageDmsDeleteStoredImageInputImage ↵Aleksander Morgado2022-02-264-3/+106
| | | | intermediate struct
* data,loc: remove wrong extra format field in a TLVAleksander Morgado2022-02-261-1/+0
|
* qmi-codegen: skip the need of the intermediate QmiMessageResult structAleksander Morgado2022-02-265-34/+34
| | | | | We can just have a sequence of variables in the Result TLV, no need for a full new type.
* qmicli,pdc: port to use autoptr()Aleksander Morgado2022-02-261-174/+93
|
* qmicli,pdc: port to use new APIs without QmiConfigTypeAndIdAleksander Morgado2022-02-261-86/+58
|
* pdc: skip the need of the QmiConfigTypeAndId intermediate structAleksander Morgado2022-02-264-11/+304
|
* build-aux,codegen: update copyright yearsAleksander Morgado2022-02-2616-17/+17
|
* build: don't include CTL service in GIRAleksander Morgado2022-02-221-5/+7
| | | | | We should not include any private header or source file in the computation of the GIR files.
* build-aux,codegen: skip gtk-doc snippets in internal CTL serviceAleksander Morgado2022-02-2212-109/+132
|
* libqmi-glib,doc: QmiNasBandPreference and QmiDmsBandCapability are compatibleAleksander Morgado2022-02-222-2/+6
| | | | Just make an explicit reference about this bit by bit compatibility.
* libqmi-glib,device: fix leak on unexpected message errorsAleksander Morgado2022-02-221-6/+9
| | | | transaction_complete_and_free() doesn't take ownership of the GError
* libqmi-glib,test: fix leak in invalid NAS Get Cell Location Info testAleksander Morgado2022-02-221-1/+1
|
* compat: fix 'GERAN Info' TLV return in 'NAS Get Cell Location Info'Aleksander Morgado2022-02-224-4/+226
| | | | | | | | | | | | | The 'GERAN Info' TLV returned a "cell" GArray with array elements of the wrong format. This was fixed in the 'GERAN Info v2' update, but the compat method still needs to be able to return a GArray We could return an empty GArray and be done with it, but providing a compat array with the old element type isn't a big deal either, so we try to do that. This avoids breaking users that were correctly assuming the output GArray was always set if the TLV getter didn't fail.
* build-aux,codegen: allow defining per-container "compat" contextsAleksander Morgado2022-02-222-4/+60
| | | | | | | | The compat methods need to be able to return variables in transfer-none, i.e. still owned by the container itself. In order to do so in compat methods, we will create a custom compat context that is owned by the container, so that when the container is disposed, so is the compat context.
* libqmi-glib,compat: don't set args not requested by userAleksander Morgado2022-02-211-4/+8
|
* simple-tester-python: support QMI over MBIM automaticallyAleksander Morgado2022-02-171-1/+1
|