Commit b8af8f3a authored by Slava Monich's avatar Slava Monich

Merge branch 'jb18573' into 'master'

Pass MMS location URL to the handler

See merge request !15
parents eeade0d4 ee9f12c7
......@@ -56,6 +56,12 @@
<arg type="ay" name="data" direction="in">
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
</arg>
<!--
Message download URL. This URL should uniquely identify
the message. It can be used to detect and drop duplicate
notifications.
-->
<arg direction="in" type="s" name="location"/>
<!--
Database record id for immediate retrieval, empty for manual.
-->
......
......@@ -201,6 +201,7 @@ mms_handler_dbus_message_notify(
const char* subject,
time_t expiry,
GBytes* push,
const char* location,
mms_handler_message_notify_complete_fn cb,
void* param)
{
......@@ -215,8 +216,8 @@ mms_handler_dbus_message_notify(
mms_handler_busy_inc(handler);
call = mms_handler_notify_call_create(dbus, cb, param);
org_nemomobile_mms_handler_call_message_notification(
proxy, imsi, from, subject, expiry, bytes, call->cancellable,
org_nemomobile_mms_handler_call_message_notification(proxy, imsi,
from, subject, expiry, bytes, location, call->cancellable,
mms_handler_dbus_message_notify_done, call);
g_variant_unref(bytes);
......
/*
* Copyright (C) 2013-2015 Jolla Ltd.
* Copyright (C) 2013-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -10,7 +10,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef JOLLA_MMS_HANDLER_H
......@@ -112,6 +111,7 @@ typedef struct mms_handler_class {
const char* subject, /* Subject (optional) */
time_t expiry, /* Message expiry time */
GBytes* push, /* Raw push message */
const char* location, /* Download URL */
mms_handler_message_notify_complete_fn cb,
void* param);
......@@ -192,6 +192,7 @@ mms_handler_message_notify(
const char* subject, /* Subject (optional) */
time_t expiry, /* Message expiry time */
GBytes* push, /* Raw push message */
const char* location, /* Download URL */
mms_handler_message_notify_complete_fn cb,
void* param);
......
/*
* Copyright (C) 2013-2016 Jolla Ltd.
* Copyright (C) 2013-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -119,6 +119,7 @@ mms_handler_message_notify(
const char* subject,
time_t expiry,
GBytes* push,
const char* location,
mms_handler_message_notify_complete_fn cb,
void* param)
{
......@@ -128,7 +129,7 @@ mms_handler_message_notify(
if (!from) from = "";
if (!subject) subject = "";
return klass->fn_message_notify(h, imsi, from, subject, expiry,
push, cb, param);
push, location, cb, param);
}
}
return NULL;
......
/*
* Copyright (C) 2013-2016 Jolla Ltd.
* Copyright (C) 2013-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -168,7 +168,7 @@ mms_task_notification_ind(
mms_task_ref(task);
ind->notify = mms_handler_message_notify(task->handler, task->imsi,
mms_strip_address_type(ni->from), ni->subject, ni->expiry,
ind->push, mms_task_notification_done, ind);
ind->push, ni->location, mms_task_notification_done, ind);
if (ind->notify) {
mms_task_set_state(task, MMS_TASK_STATE_PENDING);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment