summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-09-20 16:46:04 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-09-21 08:44:48 -0500
commit7e32ced1f305e6ac5cbc8c1873eea7cfaa83fa3a (patch)
tree8dbd893c59d6e3a3d18f7a994559c687ed47e1ae /plugins
parent251ac0ebd22065692cbfb4c3af348548dd11fa51 (diff)
downloadofono-7e32ced1f305e6ac5cbc8c1873eea7cfaa83fa3a.tar.bz2
example_history: Update to the new internal API
Diffstat (limited to 'plugins')
-rw-r--r--plugins/example_history.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/plugins/example_history.c b/plugins/example_history.c
index 9276d6ea..b7aec061 100644
--- a/plugins/example_history.c
+++ b/plugins/example_history.c
@@ -102,7 +102,7 @@ static void example_history_call_missed(struct ofono_history_context *context,
}
static void example_history_sms_received(struct ofono_history_context *context,
- unsigned int msg_id,
+ const struct ofono_uuid *uuid,
const char *from,
const struct tm *remote,
const struct tm *local,
@@ -111,7 +111,7 @@ static void example_history_sms_received(struct ofono_history_context *context,
char buf[128];
ofono_debug("Incoming SMS on modem: %p", context->modem);
- ofono_debug("InternalMessageId: %u", msg_id);
+ ofono_debug("InternalMessageId: %s", ofono_uuid_to_str(uuid));
ofono_debug("From: %s", from);
strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", local);
@@ -126,14 +126,14 @@ static void example_history_sms_received(struct ofono_history_context *context,
}
static void example_history_sms_send_pending(struct ofono_history_context *context,
- unsigned int msg_id,
+ const struct ofono_uuid *uuid,
const char *to, time_t when,
const char *text)
{
char buf[128];
ofono_debug("Sending SMS on modem: %p", context->modem);
- ofono_debug("InternalMessageId: %u", msg_id);
+ ofono_debug("InternalMessageId: %s", ofono_uuid_to_str(uuid));
ofono_debug("To: %s:", to);
strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&when));
@@ -142,10 +142,11 @@ static void example_history_sms_send_pending(struct ofono_history_context *conte
ofono_debug("Text: %s", text);
}
-static void example_history_sms_send_status(struct ofono_history_context *context,
- unsigned int msg_id,
- time_t when,
- enum ofono_history_sms_status s)
+static void example_history_sms_send_status(
+ struct ofono_history_context *context,
+ const struct ofono_uuid *uuid,
+ time_t when,
+ enum ofono_history_sms_status s)
{
char buf[128];
@@ -156,19 +157,21 @@ static void example_history_sms_send_status(struct ofono_history_context *contex
case OFONO_HISTORY_SMS_STATUS_PENDING:
break;
case OFONO_HISTORY_SMS_STATUS_SUBMITTED:
- ofono_debug("SMS %u submitted successfully", msg_id);
+ ofono_debug("SMS %s submitted successfully",
+ ofono_uuid_to_str(uuid));
ofono_debug("Submission Time: %s", buf);
break;
case OFONO_HISTORY_SMS_STATUS_SUBMIT_FAILED:
- ofono_debug("Sending SMS %u failed", msg_id);
+ ofono_debug("Sending SMS %s failed", ofono_uuid_to_str(uuid));
ofono_debug("Failure Time: %s", buf);
break;
case OFONO_HISTORY_SMS_STATUS_DELIVERED:
- ofono_debug("SMS delivered, msg_id: %u, time: %s", msg_id, buf);
+ ofono_debug("SMS delivered, msg_id: %s, time: %s",
+ ofono_uuid_to_str(uuid), buf);
break;
case OFONO_HISTORY_SMS_STATUS_DELIVER_FAILED:
- ofono_debug("SMS undeliverable, msg_id: %u, time: %s",
- msg_id, buf);
+ ofono_debug("SMS undeliverable, msg_id: %s, time: %s",
+ ofono_uuid_to_str(uuid), buf);
break;
default:
break;