dom/mobilemessage/src/SmsMessage.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     4  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef mozilla_dom_mobilemessage_SmsMessage_h
     7 #define mozilla_dom_mobilemessage_SmsMessage_h
     9 #include "mozilla/dom/mobilemessage/SmsTypes.h"
    10 #include "nsIDOMMozSmsMessage.h"
    11 #include "nsString.h"
    12 #include "mozilla/dom/mobilemessage/Types.h"
    13 #include "mozilla/Attributes.h"
    15 namespace mozilla {
    16 namespace dom {
    18 class SmsMessage MOZ_FINAL : public nsIDOMMozSmsMessage
    19 {
    20 public:
    21   NS_DECL_ISUPPORTS
    22   NS_DECL_NSIDOMMOZSMSMESSAGE
    24   SmsMessage(int32_t aId,
    25              uint64_t aThreadId,
    26              const nsString& aIccId,
    27              mobilemessage::DeliveryState aDelivery,
    28              mobilemessage::DeliveryStatus aDeliveryStatus,
    29              const nsString& aSender,
    30              const nsString& aReceiver,
    31              const nsString& aBody,
    32              mobilemessage::MessageClass aMessageClass,
    33              uint64_t aTimestamp,
    34              uint64_t aSentTimestamp,
    35              uint64_t aDeliveryTimestamp,
    36              bool aRead);
    38   SmsMessage(const mobilemessage::SmsMessageData& aData);
    40   static nsresult Create(int32_t aId,
    41                          uint64_t aThreadId,
    42                          const nsAString& aIccId,
    43                          const nsAString& aDelivery,
    44                          const nsAString& aDeliveryStatus,
    45                          const nsAString& aSender,
    46                          const nsAString& aReceiver,
    47                          const nsAString& aBody,
    48                          const nsAString& aMessageClass,
    49                          uint64_t aTimestamp,
    50                          uint64_t aSentTimestamp,
    51                          uint64_t aDeliveryTimestamp,
    52                          bool aRead,
    53                          JSContext* aCx,
    54                          nsIDOMMozSmsMessage** aMessage);
    55   const mobilemessage::SmsMessageData& GetData() const;
    57 private:
    58   // Don't try to use the default constructor.
    59   SmsMessage();
    61   mobilemessage::SmsMessageData mData;
    62 };
    64 } // namespace dom
    65 } // namespace mozilla
    67 #endif // mozilla_dom_mobilemessage_SmsMessage_h

mercurial