dom/mobilemessage/src/MobileMessageThread.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_MobileMessageThread_h
     7 #define mozilla_dom_mobilemessage_MobileMessageThread_h
     9 #include "mozilla/Attributes.h"
    10 #include "mozilla/dom/mobilemessage/SmsTypes.h"
    11 #include "nsIDOMMozMobileMessageThread.h"
    12 #include "nsString.h"
    14 namespace mozilla {
    15 namespace dom {
    17 class MobileMessageThread MOZ_FINAL : public nsIDOMMozMobileMessageThread
    18 {
    19 private:
    20   typedef mobilemessage::ThreadData ThreadData;
    22 public:
    23   NS_DECL_ISUPPORTS
    24   NS_DECL_NSIDOMMOZMOBILEMESSAGETHREAD
    26   MobileMessageThread(uint64_t aId,
    27                       const nsTArray<nsString>& aParticipants,
    28                       uint64_t aTimestamp,
    29                       const nsString& aLastMessageSubject,
    30                       const nsString& aBody,
    31                       uint64_t aUnreadCount,
    32                       mobilemessage::MessageType aLastMessageType);
    34   MobileMessageThread(const ThreadData& aData);
    36   static nsresult Create(uint64_t aId,
    37                          const JS::Value& aParticipants,
    38                          uint64_t aTimestamp,
    39                          const nsAString& aLastMessageSubject,
    40                          const nsAString& aBody,
    41                          uint64_t aUnreadCount,
    42                          const nsAString& aLastMessageType,
    43                          JSContext* aCx,
    44                          nsIDOMMozMobileMessageThread** aThread);
    46   const ThreadData& GetData() const { return mData; }
    48 private:
    49   // Don't try to use the default constructor.
    50   MobileMessageThread() MOZ_DELETE;
    52   ThreadData mData;
    53 };
    55 } // namespace dom
    56 } // namespace mozilla
    58 #endif // mozilla_dom_mobilemessage_MobileMessageThread_h

mercurial