2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-17 23:42:38 +04: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 13:34:21 +04:00
|
|
|
|
2013-03-01 12:38:47 +04:00
|
|
|
#ifndef mozilla_dom_mobilemessage_SmsMessage_h
|
|
|
|
#define mozilla_dom_mobilemessage_SmsMessage_h
|
2011-11-22 13:34:21 +04:00
|
|
|
|
2013-04-09 06:21:31 +04:00
|
|
|
#include "mozilla/dom/mobilemessage/SmsTypes.h"
|
2013-02-07 14:43:22 +04:00
|
|
|
#include "nsIDOMMozSmsMessage.h"
|
2011-11-22 13:34:21 +04:00
|
|
|
#include "nsString.h"
|
2013-03-01 12:38:47 +04:00
|
|
|
#include "mozilla/dom/mobilemessage/Types.h"
|
2012-06-15 06:31:55 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2011-11-22 13:34:21 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class SmsMessage final : public nsIDOMMozSmsMessage
|
2011-11-22 13:34:21 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMMOZSMSMESSAGE
|
|
|
|
|
2012-10-30 14:53:24 +04:00
|
|
|
SmsMessage(int32_t aId,
|
2013-11-02 14:17:16 +04:00
|
|
|
uint64_t aThreadId,
|
|
|
|
const nsString& aIccId,
|
2013-03-01 12:38:47 +04:00
|
|
|
mobilemessage::DeliveryState aDelivery,
|
|
|
|
mobilemessage::DeliveryStatus aDeliveryStatus,
|
2012-10-30 14:53:24 +04:00
|
|
|
const nsString& aSender,
|
|
|
|
const nsString& aReceiver,
|
|
|
|
const nsString& aBody,
|
2013-03-01 12:38:47 +04:00
|
|
|
mobilemessage::MessageClass aMessageClass,
|
2012-10-30 14:53:24 +04:00
|
|
|
uint64_t aTimestamp,
|
2013-09-23 06:31:32 +04:00
|
|
|
uint64_t aSentTimestamp,
|
2013-11-01 16:00:55 +04:00
|
|
|
uint64_t aDeliveryTimestamp,
|
2012-10-30 14:53:24 +04:00
|
|
|
bool aRead);
|
2014-03-20 06:45:55 +04:00
|
|
|
|
2014-09-02 02:26:43 +04:00
|
|
|
explicit SmsMessage(const mobilemessage::SmsMessageData& aData);
|
2011-11-24 15:45:55 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
static nsresult Create(int32_t aId,
|
2013-11-02 14:17:16 +04:00
|
|
|
uint64_t aThreadId,
|
|
|
|
const nsAString& aIccId,
|
2011-12-24 09:02:52 +04:00
|
|
|
const nsAString& aDelivery,
|
2012-10-30 14:53:24 +04:00
|
|
|
const nsAString& aDeliveryStatus,
|
2011-12-24 09:02:52 +04:00
|
|
|
const nsAString& aSender,
|
|
|
|
const nsAString& aReceiver,
|
|
|
|
const nsAString& aBody,
|
2012-10-31 13:10:44 +04:00
|
|
|
const nsAString& aMessageClass,
|
2014-03-20 06:45:55 +04:00
|
|
|
uint64_t aTimestamp,
|
|
|
|
uint64_t aSentTimestamp,
|
|
|
|
uint64_t aDeliveryTimestamp,
|
|
|
|
bool aRead,
|
2011-12-24 09:02:52 +04:00
|
|
|
JSContext* aCx,
|
|
|
|
nsIDOMMozSmsMessage** aMessage);
|
2013-03-01 12:38:47 +04:00
|
|
|
const mobilemessage::SmsMessageData& GetData() const;
|
2011-11-22 13:34:21 +04:00
|
|
|
|
|
|
|
private:
|
2014-06-23 23:56:07 +04:00
|
|
|
~SmsMessage() {}
|
|
|
|
|
2011-11-22 13:34:21 +04:00
|
|
|
// Don't try to use the default constructor.
|
|
|
|
SmsMessage();
|
|
|
|
|
2013-03-01 12:38:47 +04:00
|
|
|
mobilemessage::SmsMessageData mData;
|
2011-11-22 13:34:21 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-03-01 12:38:47 +04:00
|
|
|
#endif // mozilla_dom_mobilemessage_SmsMessage_h
|