Bumping manifests a=b2g-bump
[gecko.git] / dom / mobilemessage / MobileMessageThread.h
blobfe2b4ee8aaa79ae111cec0ff2ad6b9ccc8faca5c
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
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 explicit 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 ~MobileMessageThread() {}
51 // Don't try to use the default constructor.
52 MobileMessageThread() = delete;
54 ThreadData mData;
57 } // namespace dom
58 } // namespace mozilla
60 #endif // mozilla_dom_mobilemessage_MobileMessageThread_h