Commit Graph

16 Commits

Author SHA1 Message Date
Aleksander Morgado d782748cc8 build,libqmi-glib: only allow including `libqmi-glib.h' directly 2012-10-09 15:23:47 +02:00
Aleksander Morgado 9bc830ed2b message: `QmiMessage' objects are always valid
We make sure that every `QmiMessage' object out there is valid according to our
now internal message_check(). Therefore, it's pointless to run the validity
checks in getters, so remove those.
2012-09-26 09:25:06 +02:00
Aleksander Morgado 48f5f06b20 message: the `QmiMessage' is now a `GByteArray'
Why have our own ref-counted byte array when we can use the default glib one?
2012-09-26 09:25:06 +02:00
Aleksander Morgado 2947d4f6e5 message: use a modifiable `GByteArray' in `qmi_message_new_from_raw ()'
Passing a modifiable `GByteArray' allows us to run the validity check as soon as
we create the `QmiMessage', given that we can remove the read chunk of data from
the input buffer directly. This removal takes place both when the QMI message is
valid and invalid.
2012-09-26 09:25:06 +02:00
Aleksander Morgado c3c3acb3e6 message: improve header readability 2012-09-26 09:25:06 +02:00
Aleksander Morgado 7d3b6b3385 message: cleanup `QmiMessage' content getters 2012-09-26 09:25:05 +02:00
Aleksander Morgado 06fc47d42a message: cleanup `QmiMessage' life cycle helpers 2012-09-26 09:25:05 +02:00
Aleksander Morgado 9979a484e5 message: don't expose implementation helper methods
Don't expose methods which aren't needed out of the QmiMessage implementation.
2012-09-26 09:25:05 +02:00
Aleksander Morgado 27ce79a38b message: swapped buffer/length variables in `qmi_message_get_tlv_printable()' 2012-09-26 09:25:05 +02:00
Aleksander Morgado f88c6029d0 message: renamed `qmi_message_tlv_foreach()' to `qmi_message_foreach_raw_tlv()' 2012-09-26 09:25:05 +02:00
Aleksander Morgado d6613195a9 message: renamed `qmi_message_tlv_add()' to `qmi_message_add_raw_tlv()'
Also swapped length and buffer variables; it no longer follows the 'TLV' name
(type,length,value), but it's more consistent with other interfaces where
buffer is given first and then the length.
2012-09-26 09:25:05 +02:00
Aleksander Morgado 3347c00dab message: renamed `qmi_message_tlv_get()' to `qmi_message_get_raw_tlv()'
Also made it return directly a pointer to the raw data buffer.
2012-09-26 09:25:05 +02:00
Aleksander Morgado d7b05576a9 libqmi-glib,utils: use constant buffer pointer when reading variables
The contents of the input buffer are never modified when reading variables from
it, so better use a constant pointer in the methods doing it.

What it does change is the pointer to the current position in the constant
buffer.
2012-09-26 09:25:05 +02:00
Aleksander Morgado 75f3c85b10 qmi-codegen: support a new 'version' tag in the messages
If the 'version' tag is given in the messages and the `QmiDevice' is opened with
a explicit version info check, we will return an error if we're trying to send
a message which was introduced in a newer version of a service we support.
2012-07-23 12:20:25 +02:00
Aleksander Morgado aaca4ae356 device: fail with error if version info check of the command fails
If the device was opened with an explicit version info check, we will make sure
we do not try to send a message which is not supported by the corresponding
service.
2012-07-23 11:56:05 +02:00
Aleksander Morgado cb6985816b build: prepare sources to treat `libqmi-glib' not as the only library
Instead of keeping the libqmi-glib sources under `src', we'll have a more
specific `libqmi-glib' directory instead.

Also, update autotools to reflect as `libqmi' the name of the project.
2012-07-03 16:08:59 +02:00