mirror of git://git.sysmocom.de/ofono
history: Update to the new SHA1 based sms id API
This commit is contained in:
parent
753cab6f70
commit
dbd7639d25
|
@ -26,6 +26,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <ofono/types.h>
|
||||||
|
|
||||||
enum ofono_disconnect_reason;
|
enum ofono_disconnect_reason;
|
||||||
struct ofono_call;
|
struct ofono_call;
|
||||||
|
|
||||||
|
@ -53,14 +55,16 @@ struct ofono_history_driver {
|
||||||
void (*call_missed)(struct ofono_history_context *context,
|
void (*call_missed)(struct ofono_history_context *context,
|
||||||
const struct ofono_call *call, time_t when);
|
const struct ofono_call *call, time_t when);
|
||||||
void (*sms_received)(struct ofono_history_context *context,
|
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 struct tm *remote, const struct tm *local,
|
||||||
const char *text);
|
const char *text);
|
||||||
void (*sms_send_pending)(struct ofono_history_context *context,
|
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);
|
time_t when, const char *text);
|
||||||
void (*sms_send_status)(struct ofono_history_context *context,
|
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);
|
enum ofono_history_sms_status status);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct history_call_foreach_data {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct history_sms_foreach_data {
|
struct history_sms_foreach_data {
|
||||||
unsigned int msg_id;
|
const struct ofono_uuid *uuid;
|
||||||
const char *address;
|
const char *address;
|
||||||
const char *text;
|
const char *text;
|
||||||
union {
|
union {
|
||||||
|
@ -170,12 +170,12 @@ static void history_sms_received(struct ofono_atom *atom, void *data)
|
||||||
if (context->driver->sms_received == NULL)
|
if (context->driver->sms_received == NULL)
|
||||||
return;
|
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);
|
hfd->remote, hfd->local, hfd->text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __ofono_history_sms_received(struct ofono_modem *modem,
|
void __ofono_history_sms_received(struct ofono_modem *modem,
|
||||||
unsigned int msg_id,
|
const struct ofono_uuid *uuid,
|
||||||
const char *from,
|
const char *from,
|
||||||
const struct tm *remote,
|
const struct tm *remote,
|
||||||
const struct tm *local,
|
const struct tm *local,
|
||||||
|
@ -183,7 +183,7 @@ void __ofono_history_sms_received(struct ofono_modem *modem,
|
||||||
{
|
{
|
||||||
struct history_sms_foreach_data hfd;
|
struct history_sms_foreach_data hfd;
|
||||||
|
|
||||||
hfd.msg_id = msg_id;
|
hfd.uuid = uuid;
|
||||||
hfd.address = from;
|
hfd.address = from;
|
||||||
hfd.remote = remote;
|
hfd.remote = remote;
|
||||||
hfd.local = local;
|
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)
|
if (context->driver->sms_send_pending == NULL)
|
||||||
return;
|
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);
|
hfd->when, hfd->text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __ofono_history_sms_send_pending(struct ofono_modem *modem,
|
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)
|
time_t when, const char *text)
|
||||||
{
|
{
|
||||||
struct history_sms_foreach_data hfd;
|
struct history_sms_foreach_data hfd;
|
||||||
|
|
||||||
hfd.msg_id = msg_id;
|
hfd.uuid = uuid;
|
||||||
hfd.address = to;
|
hfd.address = to;
|
||||||
hfd.text = text;
|
hfd.text = text;
|
||||||
hfd.when = when;
|
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)
|
if (context->driver->sms_send_status == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
context->driver->sms_send_status(context, hfd->msg_id,
|
context->driver->sms_send_status(context, hfd->uuid,
|
||||||
hfd->when, hfd->status);
|
hfd->when, hfd->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __ofono_history_sms_send_status(struct ofono_modem *modem,
|
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)
|
enum ofono_history_sms_status status)
|
||||||
{
|
{
|
||||||
struct history_sms_foreach_data hfd;
|
struct history_sms_foreach_data hfd;
|
||||||
|
|
||||||
hfd.msg_id = msg_id;
|
hfd.uuid = uuid;
|
||||||
hfd.address = NULL;
|
hfd.address = NULL;
|
||||||
hfd.text = NULL;
|
hfd.text = NULL;
|
||||||
hfd.when = when;
|
hfd.when = when;
|
||||||
|
|
|
@ -305,17 +305,20 @@ void __ofono_history_call_missed(struct ofono_modem *modem,
|
||||||
const struct ofono_call *call, time_t when);
|
const struct ofono_call *call, time_t when);
|
||||||
|
|
||||||
void __ofono_history_sms_received(struct ofono_modem *modem,
|
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 *remote,
|
||||||
const struct tm *local,
|
const struct tm *local,
|
||||||
const char *text);
|
const char *text);
|
||||||
|
|
||||||
void __ofono_history_sms_send_pending(struct ofono_modem *modem,
|
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);
|
time_t when, const char *text);
|
||||||
|
|
||||||
void __ofono_history_sms_send_status(struct ofono_modem *modem,
|
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);
|
enum ofono_history_sms_status status);
|
||||||
|
|
||||||
#include <ofono/message-waiting.h>
|
#include <ofono/message-waiting.h>
|
||||||
|
|
Loading…
Reference in New Issue