michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_mobilemessage_MobileMessageThread_h michael@0: #define mozilla_dom_mobilemessage_MobileMessageThread_h michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "mozilla/dom/mobilemessage/SmsTypes.h" michael@0: #include "nsIDOMMozMobileMessageThread.h" michael@0: #include "nsString.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class MobileMessageThread MOZ_FINAL : public nsIDOMMozMobileMessageThread michael@0: { michael@0: private: michael@0: typedef mobilemessage::ThreadData ThreadData; michael@0: michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIDOMMOZMOBILEMESSAGETHREAD michael@0: michael@0: MobileMessageThread(uint64_t aId, michael@0: const nsTArray& aParticipants, michael@0: uint64_t aTimestamp, michael@0: const nsString& aLastMessageSubject, michael@0: const nsString& aBody, michael@0: uint64_t aUnreadCount, michael@0: mobilemessage::MessageType aLastMessageType); michael@0: michael@0: MobileMessageThread(const ThreadData& aData); michael@0: michael@0: static nsresult Create(uint64_t aId, michael@0: const JS::Value& aParticipants, michael@0: uint64_t aTimestamp, michael@0: const nsAString& aLastMessageSubject, michael@0: const nsAString& aBody, michael@0: uint64_t aUnreadCount, michael@0: const nsAString& aLastMessageType, michael@0: JSContext* aCx, michael@0: nsIDOMMozMobileMessageThread** aThread); michael@0: michael@0: const ThreadData& GetData() const { return mData; } michael@0: michael@0: private: michael@0: // Don't try to use the default constructor. michael@0: MobileMessageThread() MOZ_DELETE; michael@0: michael@0: ThreadData mData; michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_mobilemessage_MobileMessageThread_h