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"
17 class MobileMessageThread MOZ_FINAL
: public nsIDOMMozMobileMessageThread
20 typedef mobilemessage::ThreadData ThreadData
;
24 NS_DECL_NSIDOMMOZMOBILEMESSAGETHREAD
26 MobileMessageThread(uint64_t aId
,
27 const nsTArray
<nsString
>& aParticipants
,
29 const nsString
& aLastMessageSubject
,
30 const nsString
& aBody
,
31 uint64_t aUnreadCount
,
32 mobilemessage::MessageType aLastMessageType
);
34 explicit MobileMessageThread(const ThreadData
& aData
);
36 static nsresult
Create(uint64_t aId
,
37 const JS::Value
& aParticipants
,
39 const nsAString
& aLastMessageSubject
,
40 const nsAString
& aBody
,
41 uint64_t aUnreadCount
,
42 const nsAString
& aLastMessageType
,
44 nsIDOMMozMobileMessageThread
** aThread
);
46 const ThreadData
& GetData() const { return mData
; }
49 ~MobileMessageThread() {}
51 // Don't try to use the default constructor.
52 MobileMessageThread() = delete;
58 } // namespace mozilla
60 #endif // mozilla_dom_mobilemessage_MobileMessageThread_h