Bumping manifests a=b2g-bump
[gecko.git] / dom / mobilemessage / MobileMessageService.cpp
blob77fff9ea301954230e4f9d8bffb5f9699f4d4649
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "SmsMessage.h"
6 #include "MmsMessage.h"
7 #include "MobileMessageThread.h"
8 #include "MobileMessageService.h"
9 #include "DeletedMessageInfo.h"
11 namespace mozilla {
12 namespace dom {
13 namespace mobilemessage {
15 NS_IMPL_ISUPPORTS(MobileMessageService, nsIMobileMessageService)
17 NS_IMETHODIMP
18 MobileMessageService::CreateSmsMessage(int32_t aId,
19 uint64_t aThreadId,
20 const nsAString& aIccId,
21 const nsAString& aDelivery,
22 const nsAString& aDeliveryStatus,
23 const nsAString& aSender,
24 const nsAString& aReceiver,
25 const nsAString& aBody,
26 const nsAString& aMessageClass,
27 uint64_t aTimestamp,
28 uint64_t aSentTimestamp,
29 uint64_t aDeliveryTimestamp,
30 bool aRead,
31 JSContext* aCx,
32 nsIDOMMozSmsMessage** aMessage)
34 return SmsMessage::Create(aId,
35 aThreadId,
36 aIccId,
37 aDelivery,
38 aDeliveryStatus,
39 aSender,
40 aReceiver,
41 aBody,
42 aMessageClass,
43 aTimestamp,
44 aSentTimestamp,
45 aDeliveryTimestamp,
46 aRead,
47 aCx,
48 aMessage);
51 NS_IMETHODIMP
52 MobileMessageService::CreateMmsMessage(int32_t aId,
53 uint64_t aThreadId,
54 const nsAString& aIccId,
55 const nsAString& aDelivery,
56 JS::Handle<JS::Value> aDeliveryInfo,
57 const nsAString& aSender,
58 JS::Handle<JS::Value> aReceivers,
59 uint64_t aTimestamp,
60 uint64_t aSentTimestamp,
61 bool aRead,
62 const nsAString& aSubject,
63 const nsAString& aSmil,
64 JS::Handle<JS::Value> aAttachments,
65 uint64_t aExpiryDate,
66 bool aReadReportRequested,
67 JSContext* aCx,
68 nsIDOMMozMmsMessage** aMessage)
70 return MmsMessage::Create(aId,
71 aThreadId,
72 aIccId,
73 aDelivery,
74 aDeliveryInfo,
75 aSender,
76 aReceivers,
77 aTimestamp,
78 aSentTimestamp,
79 aRead,
80 aSubject,
81 aSmil,
82 aAttachments,
83 aExpiryDate,
84 aReadReportRequested,
85 aCx,
86 aMessage);
89 NS_IMETHODIMP
90 MobileMessageService::CreateThread(uint64_t aId,
91 JS::Handle<JS::Value> aParticipants,
92 uint64_t aTimestamp,
93 const nsAString& aLastMessageSubject,
94 const nsAString& aBody,
95 uint64_t aUnreadCount,
96 const nsAString& aLastMessageType,
97 JSContext* aCx,
98 nsIDOMMozMobileMessageThread** aThread)
100 return MobileMessageThread::Create(aId,
101 aParticipants,
102 aTimestamp,
103 aLastMessageSubject,
104 aBody,
105 aUnreadCount,
106 aLastMessageType,
107 aCx,
108 aThread);
111 NS_IMETHODIMP
112 MobileMessageService::CreateDeletedMessageInfo(int32_t* aMessageIds,
113 uint32_t aMsgCount,
114 uint64_t* aThreadIds,
115 uint32_t aThreadCount,
116 nsIDeletedMessageInfo** aDeletedInfo)
118 return DeletedMessageInfo::Create(aMessageIds,
119 aMsgCount,
120 aThreadIds,
121 aThreadCount,
122 aDeletedInfo);
125 } // namespace mobilemessage
126 } // namespace dom
127 } // namespace mozilla