Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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