diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-09-20 16:38:52 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-09-21 08:44:48 -0500 |
commit | dbd7639d256be829cf20a34128f44575d8e0793a (patch) | |
tree | e8a52e2c84cc5c1dc50fe72689fa40e6ffe2528b | |
parent | 753cab6f701d7febc1f7babea4637462aae9961c (diff) | |
download | ofono-dbd7639d256be829cf20a34128f44575d8e0793a.tar.bz2 |
history: Update to the new SHA1 based sms id API
-rw-r--r-- | include/history.h | 10 | ||||
-rw-r--r-- | src/history.c | 22 | ||||
-rw-r--r-- | src/ofono.h | 9 |
3 files changed, 25 insertions, 16 deletions
diff --git a/include/history.h b/include/history.h index 17445f04..c1c4aa10 100644 --- a/include/history.h +++ b/include/history.h @@ -26,6 +26,8 @@ extern "C" { #endif +#include <ofono/types.h> + enum ofono_disconnect_reason; struct ofono_call; @@ -53,14 +55,16 @@ struct ofono_history_driver { void (*call_missed)(struct ofono_history_context *context, const struct ofono_call *call, time_t when); void (*sms_received)(struct ofono_history_context *context, - unsigned int msg_id, const char *from, + const struct ofono_uuid *uuid, const char *from, const struct tm *remote, const struct tm *local, const char *text); void (*sms_send_pending)(struct ofono_history_context *context, - unsigned int id, const char *to, + const struct ofono_uuid *uuid, + const char *to, time_t when, const char *text); void (*sms_send_status)(struct ofono_history_context *context, - unsigned int id, time_t when, + const struct ofono_uuid *uuid, + time_t when, enum ofono_history_sms_status status); }; diff --git a/src/history.c b/src/history.c index f868ca22..0229cf5d 100644 --- a/src/history.c +++ b/src/history.c @@ -45,7 +45,7 @@ struct history_call_foreach_data { }; struct history_sms_foreach_data { - unsigned int msg_id; + const struct ofono_uuid *uuid; const char *address; const char *text; union { @@ -170,12 +170,12 @@ static void history_sms_received(struct ofono_atom *atom, void *data) if (context->driver->sms_received == NULL) return; - context->driver->sms_received(context, hfd->msg_id, hfd->address, + context->driver->sms_received(context, hfd->uuid, hfd->address, hfd->remote, hfd->local, hfd->text); } void __ofono_history_sms_received(struct ofono_modem *modem, - unsigned int msg_id, + const struct ofono_uuid *uuid, const char *from, const struct tm *remote, const struct tm *local, @@ -183,7 +183,7 @@ void __ofono_history_sms_received(struct ofono_modem *modem, { struct history_sms_foreach_data hfd; - hfd.msg_id = msg_id; + hfd.uuid = uuid; hfd.address = from; hfd.remote = remote; hfd.local = local; @@ -201,17 +201,18 @@ static void history_sms_send_pending(struct ofono_atom *atom, void *data) if (context->driver->sms_send_pending == NULL) return; - context->driver->sms_send_pending(context, hfd->msg_id, hfd->address, + context->driver->sms_send_pending(context, hfd->uuid, hfd->address, hfd->when, hfd->text); } void __ofono_history_sms_send_pending(struct ofono_modem *modem, - unsigned int msg_id, const char *to, + const struct ofono_uuid *uuid, + const char *to, time_t when, const char *text) { struct history_sms_foreach_data hfd; - hfd.msg_id = msg_id; + hfd.uuid = uuid; hfd.address = to; hfd.text = text; hfd.when = when; @@ -229,17 +230,18 @@ static void history_sms_send_status(struct ofono_atom *atom, void *data) if (context->driver->sms_send_status == NULL) return; - context->driver->sms_send_status(context, hfd->msg_id, + context->driver->sms_send_status(context, hfd->uuid, hfd->when, hfd->status); } void __ofono_history_sms_send_status(struct ofono_modem *modem, - unsigned int msg_id, time_t when, + const struct ofono_uuid *uuid, + time_t when, enum ofono_history_sms_status status) { struct history_sms_foreach_data hfd; - hfd.msg_id = msg_id; + hfd.uuid = uuid; hfd.address = NULL; hfd.text = NULL; hfd.when = when; diff --git a/src/ofono.h b/src/ofono.h index f479cbd0..41ce011e 100644 --- a/src/ofono.h +++ b/src/ofono.h @@ -305,17 +305,20 @@ void __ofono_history_call_missed(struct ofono_modem *modem, const struct ofono_call *call, time_t when); void __ofono_history_sms_received(struct ofono_modem *modem, - unsigned int msg_id, const char *from, + const struct ofono_uuid *uuid, + const char *from, const struct tm *remote, const struct tm *local, const char *text); void __ofono_history_sms_send_pending(struct ofono_modem *modem, - unsigned int msg_id, const char *to, + const struct ofono_uuid *uuid, + const char *to, time_t when, const char *text); void __ofono_history_sms_send_status(struct ofono_modem *modem, - unsigned int msg_id, time_t when, + const struct ofono_uuid *uuid, + time_t when, enum ofono_history_sms_status status); #include <ofono/message-waiting.h> |