aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmi-device.c
Commit message (Collapse)AuthorAgeFilesLines
* core: use new autogenerated code for the CTL serviceAleksander Morgado2012-07-031-28/+83
|
* device: method `device_store_transaction()' should return voidAleksander Morgado2012-07-031-1/+1
|
* core: avoid unnecessary semicolons out of functionsAleksander Morgado2012-07-031-1/+1
|
* device: fix warning, let the buffer be a gchar bufferAleksander Morgado2012-07-031-2/+2
|
* device: don't include device path when setting the GErrorsAleksander Morgado2012-07-031-2/+1
|
* core: fix warning, remove unused variablesAleksander Morgado2012-07-031-3/+0
|
* device: allow skipping cid allocation/releaseAleksander Morgado2012-07-031-30/+66
| | | | | | | Sometimes we may want to be able to create clients with already allocated CIDs, or to be able to destroy a client without releasing the CID. This is specially useful when using the `qmicli' in a script, so that once the script allocates the CID, it doesn't need to do it again each time the cli is executed.
* device: plug memleak, ensure timeout context gets freedAleksander Morgado2012-07-031-4/+12
|
* device: new set of flags to specify actions to run when opening the deviceAleksander Morgado2012-07-031-38/+116
| | | | | | | | | | | The version-info check is no longer mandatory during the device open; it can now be explicitly requested with the `QMI_DEVICE_OPEN_FLAGS_VERSION_CHECK' flag. In the same way, we can also request a sync operation (which is supposed to release every allocated client ID) with the `QMI_DEVICE_OPEN_FLAGS_SYNC' flag. The `qmicli' utility includes now also two new service-independent options to enable each of these new flags: `--device-open-version-check' and `--device-open-sync'.
* device: log client registrations and unregistrationsAleksander Morgado2012-07-031-0/+8
|
* device: don't detect generic QMI errors, let the message parsers notify themAleksander Morgado2012-07-031-11/+4
| | | | | Message response parsers may want to get additional TLVs when specific QMI errors are reported.
* device: let the `QmiDevice' allocate new `QmiClientWds' objectsAleksander Morgado2012-07-031-0/+5
|
* device: handle EAGAIN errors when writing to the channelAleksander Morgado2012-07-031-12/+32
| | | | | | If the non-blocking socket's write buffers are full, the non-blocking write may fail with EAGAIN errors, which we should just treat as a request to retry the write.
* device: don't try to allocate a CID for an unsupported serviceAleksander Morgado2012-07-031-10/+44
|
* core: let the `QmiDevice' control the creation and handling of `QmiClient' ↵Aleksander Morgado2012-07-031-105/+340
| | | | | | | | | | | | | objects Instead of treating the QmiClient objects as being independent to the device, we'll make them instead owned by the QmiDevice. This means that the QmiDevice is reponsible for allocationg and releasing the CIDs, and that a QmiClient doesn't need to keep a reference to the QmiDevice around. This simplification allows us to treat the `QmiClientCtl' as completely internal to the library. Uses of the library shouldn't need to interface directly with this object.
* ctl: new opaque type to return the results of the VERSION_INFO requestAleksander Morgado2012-07-031-6/+6
| | | | | | | | We do not want to explicitly list every possible return value in the `qmi_client_ctl_get_version_info_finish()' method, as that would break compatibility if we ever need to add a new value being returned. Instead, we will create opaque types for the return of each operation, with specific getters for the values returned.
* device: rely on unix-fd based GIOChannelsAleksander Morgado2012-07-031-25/+46
| | | | We don't want any file based GIOChannel specific behaviour.
* device: allow clients to get registered if they want to receive indication ↵Aleksander Morgado2012-07-031-43/+189
| | | | messages
* message: improve printable stringAleksander Morgado2012-07-031-2/+2
| | | | | The user can now pass a prefix to be used in every printed string; and we also decode some of the values from the message into human-readable strings.
* message: new helpers to check whether a given message is a response or an ↵Aleksander Morgado2012-07-031-1/+1
| | | | indication
* qmi-device: avoid warnings when putting the guint32 into a gpointerAleksander Morgado2012-07-031-1/+2
|
* device: detect broadcast messages and avoid trying to match transactions on themAleksander Morgado2012-07-031-0/+3
|
* device: report QMI protocol errors up the stackAleksander Morgado2012-07-031-2/+11
|
* device: don't allow sending messages without a proper CIDAleksander Morgado2012-07-031-0/+12
|
* device: skip implicit channel buffering from GLibAleksander Morgado2012-07-031-0/+4
|
* client-ctl: new `QmiClientCtl' to handle the CTL serviceAleksander Morgado2012-07-031-64/+122
| | | | | The `QmiDevice' will create one of these objects and keep it around, to be used as the generic client in the CTL service.
* device: allow commands to time out if no reply is receivedAleksander Morgado2012-07-031-16/+66
|
* device: check version info of the device when it gets openedAleksander Morgado2012-07-031-6/+83
| | | | | If the device doesn't reply properly to the version info request, the open operation will get failed.
* device: new async method to send a `QmiMessage' request and receive a replyAleksander Morgado2012-07-031-2/+275
| | | | | The `QmiDevice' will keep track of each transaction, so that whenever the proper reply is received, the async operation gets finished.
* device: new methods to open/close the portAleksander Morgado2012-07-031-0/+257
| | | | | When the port is opened, we create a GIOChannel for R/W, with a proper callback to read the data as soon as it is available.
* device: new `QmiDevice' objectAleksander Morgado2012-07-031-0/+370
Will take care of synchronizing the access to the underlying QMI device file.