2011-11-22 01:34:21 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-17 12:42:38 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-11-22 01:34:21 -08:00
|
|
|
|
2013-03-01 00:38:47 -08:00
|
|
|
#ifndef mozilla_dom_mobilemessage_SmsMessage_h
|
|
|
|
#define mozilla_dom_mobilemessage_SmsMessage_h
|
2011-11-22 01:34:21 -08:00
|
|
|
|
2013-04-08 19:21:31 -07:00
|
|
|
#include "mozilla/dom/mobilemessage/SmsTypes.h"
|
2013-02-07 02:43:22 -08:00
|
|
|
#include "nsIDOMMozSmsMessage.h"
|
2011-11-22 01:34:21 -08:00
|
|
|
#include "nsString.h"
|
2013-03-01 00:38:47 -08:00
|
|
|
#include "mozilla/dom/mobilemessage/Types.h"
|
2012-06-14 19:31:55 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2011-11-22 01:34:21 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
class SmsMessage final : public nsIDOMMozSmsMessage
|
2011-11-22 01:34:21 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMMOZSMSMESSAGE
|
|
|
|
|
2012-10-30 03:53:24 -07:00
|
|
|
SmsMessage(int32_t aId,
|
2013-11-02 03:17:16 -07:00
|
|
|
uint64_t aThreadId,
|
|
|
|
const nsString& aIccId,
|
2013-03-01 00:38:47 -08:00
|
|
|
mobilemessage::DeliveryState aDelivery,
|
|
|
|
mobilemessage::DeliveryStatus aDeliveryStatus,
|
2012-10-30 03:53:24 -07:00
|
|
|
const nsString& aSender,
|
|
|
|
const nsString& aReceiver,
|
|
|
|
const nsString& aBody,
|
2013-03-01 00:38:47 -08:00
|
|
|
mobilemessage::MessageClass aMessageClass,
|
2012-10-30 03:53:24 -07:00
|
|
|
uint64_t aTimestamp,
|
2013-09-22 19:31:32 -07:00
|
|
|
uint64_t aSentTimestamp,
|
2013-11-01 05:00:55 -07:00
|
|
|
uint64_t aDeliveryTimestamp,
|
2012-10-30 03:53:24 -07:00
|
|
|
bool aRead);
|
2014-03-19 19:45:55 -07:00
|
|
|
|
2014-09-01 15:26:43 -07:00
|
|
|
explicit SmsMessage(const mobilemessage::SmsMessageData& aData);
|
2011-11-24 03:45:55 -08:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
static nsresult Create(int32_t aId,
|
2013-11-02 03:17:16 -07:00
|
|
|
uint64_t aThreadId,
|
|
|
|
const nsAString& aIccId,
|
2011-12-23 21:02:52 -08:00
|
|
|
const nsAString& aDelivery,
|
2012-10-30 03:53:24 -07:00
|
|
|
const nsAString& aDeliveryStatus,
|
2011-12-23 21:02:52 -08:00
|
|
|
const nsAString& aSender,
|
|
|
|
const nsAString& aReceiver,
|
|
|
|
const nsAString& aBody,
|
2012-10-31 02:10:44 -07:00
|
|
|
const nsAString& aMessageClass,
|
2014-03-19 19:45:55 -07:00
|
|
|
uint64_t aTimestamp,
|
|
|
|
uint64_t aSentTimestamp,
|
|
|
|
uint64_t aDeliveryTimestamp,
|
|
|
|
bool aRead,
|
2011-12-23 21:02:52 -08:00
|
|
|
JSContext* aCx,
|
|
|
|
nsIDOMMozSmsMessage** aMessage);
|
2013-03-01 00:38:47 -08:00
|
|
|
const mobilemessage::SmsMessageData& GetData() const;
|
2011-11-22 01:34:21 -08:00
|
|
|
|
|
|
|
private:
|
2014-06-23 12:56:07 -07:00
|
|
|
~SmsMessage() {}
|
|
|
|
|
2011-11-22 01:34:21 -08:00
|
|
|
// Don't try to use the default constructor.
|
|
|
|
SmsMessage();
|
|
|
|
|
2013-03-01 00:38:47 -08:00
|
|
|
mobilemessage::SmsMessageData mData;
|
2011-11-22 01:34:21 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-03-01 00:38:47 -08:00
|
|
|
#endif // mozilla_dom_mobilemessage_SmsMessage_h
|