Bug 901457 - [sms][mms] We need a property for the "sent" timestamp (part 1, IDL changes). sr=sicking f=vicamo

This commit is contained in:
Gene Lian 2013-09-23 10:31:12 +08:00
parent 3a5747f366
commit 10d0a19371
4 changed files with 26 additions and 4 deletions

View File

@ -27,7 +27,7 @@ dictionary MmsDeliveryInfo
// |delivery| = "received" or not yet read). // |delivery| = "received" or not yet read).
}; };
[scriptable, builtinclass, uuid(4ca3a456-0e25-4331-974a-a8f11a5efb4b)] [scriptable, builtinclass, uuid(f41d7400-0026-11e3-829d-eb7459c03810)]
interface nsIDOMMozMmsMessage : nsISupports interface nsIDOMMozMmsMessage : nsISupports
{ {
/** /**
@ -61,6 +61,10 @@ interface nsIDOMMozMmsMessage : nsISupports
readonly attribute DOMTimeStamp timestamp; readonly attribute DOMTimeStamp timestamp;
readonly attribute DOMTimeStamp sentTimestamp;
// 0 if not available (e.g., |delivery| =
// "sending").
readonly attribute boolean read; readonly attribute boolean read;
readonly attribute DOMString subject; readonly attribute DOMString subject;
readonly attribute DOMString smil; readonly attribute DOMString smil;

View File

@ -5,7 +5,7 @@
#include "domstubs.idl" #include "domstubs.idl"
#include "nsISupports.idl" #include "nsISupports.idl"
[scriptable, builtinclass, uuid(c591dcf8-5322-11e3-899e-9baad640ca82)] [scriptable, builtinclass, uuid(fc8153d2-0026-11e3-bf31-8b0c1d5e7638)]
interface nsIDOMMozSmsMessage : nsISupports interface nsIDOMMozSmsMessage : nsISupports
{ {
/** /**
@ -52,6 +52,10 @@ interface nsIDOMMozSmsMessage : nsISupports
readonly attribute DOMTimeStamp timestamp; readonly attribute DOMTimeStamp timestamp;
readonly attribute DOMTimeStamp sentTimestamp;
// 0 if not available (e.g., |delivery| =
// "sending").
readonly attribute DOMTimeStamp deliveryTimestamp; readonly attribute DOMTimeStamp deliveryTimestamp;
// 0 if not available (e.g., |delivery| = // 0 if not available (e.g., |delivery| =
// "received" or not yet delivered). // "received" or not yet delivered).

View File

@ -570,6 +570,13 @@ MmsMessage::GetTimestamp(DOMTimeStamp* aTimestamp)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
MmsMessage::GetSentTimestamp(DOMTimeStamp* aSentTimestamp)
{
*aSentTimestamp = 0;
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP NS_IMETHODIMP
MmsMessage::GetRead(bool* aRead) MmsMessage::GetRead(bool* aRead)
{ {

View File

@ -260,12 +260,19 @@ SmsMessage::GetMessageClass(nsAString& aMessageClass)
} }
NS_IMETHODIMP NS_IMETHODIMP
SmsMessage::GetTimestamp(DOMTimeStamp* aDate) SmsMessage::GetTimestamp(DOMTimeStamp* aTimestamp)
{ {
*aDate = mData.timestamp(); *aTimestamp = mData.timestamp();
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
SmsMessage::GetSentTimestamp(DOMTimeStamp* aSentTimestamp)
{
*aSentTimestamp = 0;
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP NS_IMETHODIMP
SmsMessage::GetDeliveryTimestamp(DOMTimeStamp* aDate) SmsMessage::GetDeliveryTimestamp(DOMTimeStamp* aDate)
{ {