diff options
Diffstat (limited to 'src/libembim/embim-device.h')
-rw-r--r-- | src/libembim/embim-device.h | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/src/libembim/embim-device.h b/src/libembim/embim-device.h index c351fda..19e1d3c 100644 --- a/src/libembim/embim-device.h +++ b/src/libembim/embim-device.h @@ -67,9 +67,48 @@ embim_device_t *embim_device_new (const char *path); */ void embim_device_free (embim_device_t *self); -embim_status_e embim_device_open (embim_device_t *self); +/** + * embim_device_open: + * @self: a #embim_device_t. + * + * Opens the MBIM device for reading and writing. + * + * Note that this method does not send the MBIM Open message to the device. + * + * Operation may finish with the following status values: + * - %EMBIM_STATUS_SUCCESS: Operation succeeded. + * - %EMBIM_STATUS_ERROR_UNAUTHORIZED: Not enough privileges to open the control device. + * - %EMBIM_STATUS_ERROR_GENERIC: Generic filesystem I/O error. + * + * Returns: a #embim_status_e. + */ +embim_status_e embim_device_open (embim_device_t *self); + +/** + * embim_device_get_fd: + * @self: a #embim_device_t. + * + * Gets the internal file descriptor of the #embim_device_t, which the user + * should setup for polling. + * + * Returns: the file descriptor. + */ +int embim_device_get_fd (embim_device_t *self); -embim_status_e embim_device_close (embim_device_t *self); +/** + * embim_device_close: + * @self: a #embim_device_t. + * + * Closes the MBIM device. + * + * Note that this method does not send the MBIM Close message to the device. + * + * Operation may finish with the following status values: + * - %EMBIM_STATUS_SUCCESS: Operation succeeded. + * + * Returns: a #embim_status_e. + */ +embim_status_e embim_device_close (embim_device_t *self); /** * embim_device_indication_cb: |