dom/mobilemessage/src/SmsMessage.h

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:578a2ba27a92
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/. */
5
6 #ifndef mozilla_dom_mobilemessage_SmsMessage_h
7 #define mozilla_dom_mobilemessage_SmsMessage_h
8
9 #include "mozilla/dom/mobilemessage/SmsTypes.h"
10 #include "nsIDOMMozSmsMessage.h"
11 #include "nsString.h"
12 #include "mozilla/dom/mobilemessage/Types.h"
13 #include "mozilla/Attributes.h"
14
15 namespace mozilla {
16 namespace dom {
17
18 class SmsMessage MOZ_FINAL : public nsIDOMMozSmsMessage
19 {
20 public:
21 NS_DECL_ISUPPORTS
22 NS_DECL_NSIDOMMOZSMSMESSAGE
23
24 SmsMessage(int32_t aId,
25 uint64_t aThreadId,
26 const nsString& aIccId,
27 mobilemessage::DeliveryState aDelivery,
28 mobilemessage::DeliveryStatus aDeliveryStatus,
29 const nsString& aSender,
30 const nsString& aReceiver,
31 const nsString& aBody,
32 mobilemessage::MessageClass aMessageClass,
33 uint64_t aTimestamp,
34 uint64_t aSentTimestamp,
35 uint64_t aDeliveryTimestamp,
36 bool aRead);
37
38 SmsMessage(const mobilemessage::SmsMessageData& aData);
39
40 static nsresult Create(int32_t aId,
41 uint64_t aThreadId,
42 const nsAString& aIccId,
43 const nsAString& aDelivery,
44 const nsAString& aDeliveryStatus,
45 const nsAString& aSender,
46 const nsAString& aReceiver,
47 const nsAString& aBody,
48 const nsAString& aMessageClass,
49 uint64_t aTimestamp,
50 uint64_t aSentTimestamp,
51 uint64_t aDeliveryTimestamp,
52 bool aRead,
53 JSContext* aCx,
54 nsIDOMMozSmsMessage** aMessage);
55 const mobilemessage::SmsMessageData& GetData() const;
56
57 private:
58 // Don't try to use the default constructor.
59 SmsMessage();
60
61 mobilemessage::SmsMessageData mData;
62 };
63
64 } // namespace dom
65 } // namespace mozilla
66
67 #endif // mozilla_dom_mobilemessage_SmsMessage_h

mercurial