qcdm-serial-port: allow cancelling the response timeout

This commit is contained in:
Aleksander Morgado
2012-03-07 13:07:17 +01:00
parent 9b38cd4f5c
commit 5a485d74a2
5 changed files with 13 additions and 3 deletions

View File

@@ -1236,6 +1236,7 @@ signal_quality_qcdm (SignalQualityContext *ctx)
mm_qcdm_serial_port_queue_command (MM_QCDM_SERIAL_PORT (ctx->port), mm_qcdm_serial_port_queue_command (MM_QCDM_SERIAL_PORT (ctx->port),
pilot_sets, pilot_sets,
3, 3,
NULL,
(MMQcdmSerialResponseFn)signal_quality_qcdm_ready, (MMQcdmSerialResponseFn)signal_quality_qcdm_ready,
ctx); ctx);
} }
@@ -4706,6 +4707,7 @@ modem_cdma_get_hdr_state (MMIfaceModemCdma *self,
mm_qcdm_serial_port_queue_command (ctx->qcdm, mm_qcdm_serial_port_queue_command (ctx->qcdm,
hdrstate, hdrstate,
3, 3,
NULL,
(MMQcdmSerialResponseFn)hdr_subsys_state_info_ready, (MMQcdmSerialResponseFn)hdr_subsys_state_info_ready,
ctx); ctx);
} }
@@ -4829,6 +4831,7 @@ modem_cdma_get_call_manager_state (MMIfaceModemCdma *self,
mm_qcdm_serial_port_queue_command (ctx->qcdm, mm_qcdm_serial_port_queue_command (ctx->qcdm,
cmstate, cmstate,
3, 3,
NULL,
(MMQcdmSerialResponseFn)cm_subsys_state_info_ready, (MMQcdmSerialResponseFn)cm_subsys_state_info_ready,
ctx); ctx);
} }
@@ -5099,6 +5102,7 @@ modem_cdma_get_cdma1x_serving_system (MMIfaceModemCdma *self,
mm_qcdm_serial_port_queue_command (ctx->qcdm, mm_qcdm_serial_port_queue_command (ctx->qcdm,
cdma_status, cdma_status,
3, 3,
NULL,
(MMQcdmSerialResponseFn)qcdm_cdma_status_ready, (MMQcdmSerialResponseFn)qcdm_cdma_status_ready,
ctx); ctx);
return; return;

View File

@@ -277,11 +277,13 @@ serial_probe_qcdm (MMPortProbe *self)
mm_qcdm_serial_port_queue_command (MM_QCDM_SERIAL_PORT (task->serial), mm_qcdm_serial_port_queue_command (MM_QCDM_SERIAL_PORT (task->serial),
verinfo, verinfo,
3, 3,
NULL,
(MMQcdmSerialResponseFn)serial_probe_qcdm_parse_response, (MMQcdmSerialResponseFn)serial_probe_qcdm_parse_response,
NULL); NULL);
mm_qcdm_serial_port_queue_command (MM_QCDM_SERIAL_PORT (task->serial), mm_qcdm_serial_port_queue_command (MM_QCDM_SERIAL_PORT (task->serial),
verinfo2, verinfo2,
3, 3,
NULL,
(MMQcdmSerialResponseFn)serial_probe_qcdm_parse_response, (MMQcdmSerialResponseFn)serial_probe_qcdm_parse_response,
self); self);

View File

@@ -145,6 +145,7 @@ void
mm_qcdm_serial_port_queue_command (MMQcdmSerialPort *self, mm_qcdm_serial_port_queue_command (MMQcdmSerialPort *self,
GByteArray *command, GByteArray *command,
guint32 timeout_seconds, guint32 timeout_seconds,
GCancellable *cancellable,
MMQcdmSerialResponseFn callback, MMQcdmSerialResponseFn callback,
gpointer user_data) gpointer user_data)
{ {
@@ -157,7 +158,7 @@ mm_qcdm_serial_port_queue_command (MMQcdmSerialPort *self,
command, command,
TRUE, TRUE,
timeout_seconds, timeout_seconds,
NULL, cancellable,
(MMSerialResponseFn) callback, (MMSerialResponseFn) callback,
user_data); user_data);
} }
@@ -166,6 +167,7 @@ void
mm_qcdm_serial_port_queue_command_cached (MMQcdmSerialPort *self, mm_qcdm_serial_port_queue_command_cached (MMQcdmSerialPort *self,
GByteArray *command, GByteArray *command,
guint32 timeout_seconds, guint32 timeout_seconds,
GCancellable *cancellable,
MMQcdmSerialResponseFn callback, MMQcdmSerialResponseFn callback,
gpointer user_data) gpointer user_data)
{ {
@@ -178,7 +180,7 @@ mm_qcdm_serial_port_queue_command_cached (MMQcdmSerialPort *self,
command, command,
TRUE, TRUE,
timeout_seconds, timeout_seconds,
NULL, cancellable,
(MMSerialResponseFn) callback, (MMSerialResponseFn) callback,
user_data); user_data);
} }

View File

@@ -54,12 +54,14 @@ MMQcdmSerialPort *mm_qcdm_serial_port_new_fd (int fd);
void mm_qcdm_serial_port_queue_command (MMQcdmSerialPort *self, void mm_qcdm_serial_port_queue_command (MMQcdmSerialPort *self,
GByteArray *command, GByteArray *command,
guint32 timeout_seconds, guint32 timeout_seconds,
GCancellable *cancellable,
MMQcdmSerialResponseFn callback, MMQcdmSerialResponseFn callback,
gpointer user_data); gpointer user_data);
void mm_qcdm_serial_port_queue_command_cached (MMQcdmSerialPort *self, void mm_qcdm_serial_port_queue_command_cached (MMQcdmSerialPort *self,
GByteArray *command, GByteArray *command,
guint32 timeout_seconds, guint32 timeout_seconds,
GCancellable *cancellable,
MMQcdmSerialResponseFn callback, MMQcdmSerialResponseFn callback,
gpointer user_data); gpointer user_data);

View File

@@ -201,7 +201,7 @@ qcdm_request_verinfo (MMQcdmSerialPort *port, VerInfoCb cb, GMainLoop *loop)
g_byte_array_free (verinfo, TRUE); g_byte_array_free (verinfo, TRUE);
verinfo->len = len; verinfo->len = len;
mm_qcdm_serial_port_queue_command (port, verinfo, 3, cb, loop); mm_qcdm_serial_port_queue_command (port, verinfo, 3, NULL, cb, loop);
} }
static void static void