mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 838467 1/5: use DOMCursor instead of SmsCursor. Interface changes. sr=sicking, r=bent
This commit is contained in:
parent
682474714f
commit
917001889d
@ -8,6 +8,7 @@ interface nsIDOMEventListener;
|
||||
interface nsIDOMMozSmsRequest;
|
||||
interface nsIDOMMozSmsFilter;
|
||||
interface nsIDOMMozSmsSegmentInfo;
|
||||
interface nsIDOMDOMCursor;
|
||||
interface nsIDOMDOMRequest;
|
||||
interface nsIDOMBlob;
|
||||
|
||||
@ -19,7 +20,7 @@ dictionary MmsParameters
|
||||
jsval attachments; // MmsAttachment[]
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(4ed1f928-360d-4767-b02b-f74cdc58727d)]
|
||||
[scriptable, builtinclass, uuid(44346294-6c8f-4a06-a412-1f38f7d45f2e)]
|
||||
interface nsIDOMMozMobileMessageManager : nsIDOMEventTarget
|
||||
{
|
||||
nsIDOMMozSmsSegmentInfo getSegmentInfoForText(in DOMString text);
|
||||
@ -38,7 +39,7 @@ interface nsIDOMMozMobileMessageManager : nsIDOMEventTarget
|
||||
// The parameter can be either a message id or a nsIDOMMoz{Mms,Sms}Message.
|
||||
nsIDOMDOMRequest delete(in jsval param);
|
||||
|
||||
nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
|
||||
nsIDOMDOMCursor getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
|
||||
|
||||
nsIDOMDOMRequest markMessageRead(in long id, in boolean aValue);
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMMozSmsFilter;
|
||||
interface nsIDOMMozSmsMessage;
|
||||
|
||||
[scriptable, function, uuid(77b41d7e-ccb1-4480-8322-2af7bc437a3c)]
|
||||
interface nsIDOMMozSmsCursor : nsISupports
|
||||
{
|
||||
// Can be null if there is no more results.
|
||||
readonly attribute nsIDOMMozSmsMessage message;
|
||||
void continue();
|
||||
};
|
@ -4,12 +4,13 @@
|
||||
|
||||
#include "nsIDOMEventTarget.idl"
|
||||
|
||||
interface nsIDOMDOMCursor;
|
||||
interface nsIDOMEventListener;
|
||||
interface nsIDOMMozSmsRequest;
|
||||
interface nsIDOMMozSmsFilter;
|
||||
interface nsIDOMMozSmsSegmentInfo;
|
||||
|
||||
[scriptable, builtinclass, uuid(9bc1d6fc-6b53-48f6-99e8-793e746e5dbb)]
|
||||
[scriptable, builtinclass, uuid(aa03b43e-82ec-4325-906e-a1ea018e1b01)]
|
||||
interface nsIDOMMozSmsManager : nsIDOMEventTarget
|
||||
{
|
||||
nsIDOMMozSmsSegmentInfo getSegmentInfoForText(in DOMString text);
|
||||
@ -26,7 +27,7 @@ interface nsIDOMMozSmsManager : nsIDOMEventTarget
|
||||
// The parameter can be either a message id or a SmsMessage.
|
||||
nsIDOMMozSmsRequest delete(in jsval param);
|
||||
|
||||
nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
|
||||
nsIDOMDOMCursor getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
|
||||
|
||||
nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue);
|
||||
|
||||
|
@ -13,7 +13,7 @@ dictionary SmsThreadListItem
|
||||
unsigned long long unreadCount;
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(edb1de12-8d58-11e2-b382-7bf132b20cb2)]
|
||||
[scriptable, builtinclass, uuid(47498737-972d-49c9-8d4e-80ae2da51778)]
|
||||
interface nsIMobileMessageCallback : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -42,15 +42,6 @@ interface nsIMobileMessageCallback : nsISupports
|
||||
void notifyMessageDeleted(in boolean deleted);
|
||||
void notifyDeleteMessageFailed(in long error);
|
||||
|
||||
/**
|
||||
* |message| can be nsIDOMMoz{Mms,Sms}Message.
|
||||
*/
|
||||
void notifyMessageListCreated(in long listId,
|
||||
in nsISupports message);
|
||||
void notifyReadMessageListFailed(in long error);
|
||||
void notifyNextMessageInListGot(in nsISupports message);
|
||||
void notifyNoMessageInList();
|
||||
|
||||
void notifyMessageMarkedRead(in boolean read);
|
||||
void notifyMarkMessageReadFailed(in long error);
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, builtinclass, uuid(8fd0dba2-032e-4190-a751-07cc3782e93e)]
|
||||
interface nsIMobileMessageCursorCallback : nsISupports
|
||||
{
|
||||
void notifyCursorError(in long error);
|
||||
void notifyCursorResult(in nsISupports result);
|
||||
void notifyCursorDone();
|
||||
};
|
@ -11,10 +11,12 @@
|
||||
#define MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID "@mozilla.org/mobilemessage/mobilemessagedatabaseservice;1"
|
||||
%}
|
||||
|
||||
interface nsICursorContinueCallback;
|
||||
interface nsIDOMMozSmsFilter;
|
||||
interface nsIMobileMessageCallback;
|
||||
interface nsIMobileMessageCursorCallback;
|
||||
|
||||
[scriptable, uuid(4000064a-86d2-11e2-b4a6-ef0f30bd1e59)]
|
||||
[scriptable, uuid(487d15e1-fd23-40cc-ba45-7c0115032e17)]
|
||||
interface nsIMobileMessageDatabaseService : nsISupports
|
||||
{
|
||||
[binaryname(GetMessageMoz)]
|
||||
@ -24,14 +26,9 @@ interface nsIMobileMessageDatabaseService : nsISupports
|
||||
void deleteMessage(in long messageId,
|
||||
in nsIMobileMessageCallback request);
|
||||
|
||||
void createMessageList(in nsIDOMMozSmsFilter filter,
|
||||
in boolean reverse,
|
||||
in nsIMobileMessageCallback request);
|
||||
|
||||
void getNextMessageInList(in long listId,
|
||||
in nsIMobileMessageCallback request);
|
||||
|
||||
void clearMessageList(in long listId);
|
||||
nsICursorContinueCallback createMessageCursor(in nsIDOMMozSmsFilter filter,
|
||||
in boolean reverse,
|
||||
in nsIMobileMessageCursorCallback callback);
|
||||
|
||||
void markMessageRead(in long messageId,
|
||||
in boolean value,
|
||||
|
34
dom/mobilemessage/src/ipc/PMobileMessageCursor.ipdl
Normal file
34
dom/mobilemessage/src/ipc/PMobileMessageCursor.ipdl
Normal file
@ -0,0 +1,34 @@
|
||||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
include "mozilla/dom/mobilemessage/Types.h";
|
||||
|
||||
include protocol PSms;
|
||||
include SmsTypes;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace mobilemessage {
|
||||
|
||||
protocol PMobileMessageCursor
|
||||
{
|
||||
manager PSms;
|
||||
|
||||
child:
|
||||
NotifyResult(SmsMessageData aMessageData);
|
||||
|
||||
/**
|
||||
* Sent when the asynchronous cursor request has completed.
|
||||
*/
|
||||
__delete__(int32_t aError);
|
||||
|
||||
parent:
|
||||
Continue();
|
||||
};
|
||||
|
||||
} // namespace mobilemessage
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
@ -6,20 +6,13 @@
|
||||
|
||||
include protocol PContent;
|
||||
include protocol PSmsRequest;
|
||||
include protocol PMobileMessageCursor;
|
||||
include SmsTypes;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace mobilemessage {
|
||||
|
||||
struct SmsFilterData {
|
||||
uint64_t startDate;
|
||||
uint64_t endDate;
|
||||
nsString[] numbers;
|
||||
DeliveryState delivery;
|
||||
ReadState read;
|
||||
};
|
||||
|
||||
struct SendMessageRequest
|
||||
{
|
||||
nsString number;
|
||||
@ -36,17 +29,12 @@ struct DeleteMessageRequest
|
||||
int32_t messageId;
|
||||
};
|
||||
|
||||
struct CreateMessageListRequest
|
||||
struct CreateMessageCursorRequest
|
||||
{
|
||||
SmsFilterData filter;
|
||||
bool reverse;
|
||||
};
|
||||
|
||||
struct GetNextMessageInListRequest
|
||||
{
|
||||
int32_t aListId;
|
||||
};
|
||||
|
||||
struct MarkMessageReadRequest
|
||||
{
|
||||
int32_t messageId;
|
||||
@ -62,8 +50,6 @@ union IPCSmsRequest
|
||||
SendMessageRequest;
|
||||
GetMessageRequest;
|
||||
DeleteMessageRequest;
|
||||
CreateMessageListRequest;
|
||||
GetNextMessageInListRequest;
|
||||
MarkMessageReadRequest;
|
||||
GetThreadListRequest;
|
||||
};
|
||||
@ -71,6 +57,7 @@ union IPCSmsRequest
|
||||
sync protocol PSms {
|
||||
manager PContent;
|
||||
manages PSmsRequest;
|
||||
manages PMobileMessageCursor;
|
||||
|
||||
child:
|
||||
NotifyReceivedMessage(SmsMessageData aMessageData);
|
||||
@ -96,13 +83,16 @@ parent:
|
||||
*/
|
||||
PSmsRequest(IPCSmsRequest request);
|
||||
|
||||
/**
|
||||
* Sent when the child makes an asynchronous cursor to the parent.
|
||||
*/
|
||||
PMobileMessageCursor(CreateMessageCursorRequest request);
|
||||
|
||||
sync HasSupport()
|
||||
returns (bool aHasSupport);
|
||||
|
||||
sync GetSegmentInfoForText(nsString aText)
|
||||
returns (SmsSegmentInfoData aResult);
|
||||
|
||||
ClearMessageList(int32_t aListId);
|
||||
};
|
||||
|
||||
} // namespace mobilemessage
|
||||
|
@ -55,22 +55,6 @@ struct ReplyMessageDeleteFail
|
||||
int32_t error;
|
||||
};
|
||||
|
||||
struct ReplyCreateMessageList
|
||||
{
|
||||
int32_t listId;
|
||||
SmsMessageData messageData;
|
||||
};
|
||||
|
||||
struct ReplyCreateMessageListFail
|
||||
{
|
||||
int32_t error;
|
||||
};
|
||||
|
||||
struct ReplyGetNextMessage
|
||||
{
|
||||
SmsMessageData messageData;
|
||||
};
|
||||
|
||||
struct ReplyMarkeMessageRead
|
||||
{
|
||||
bool read;
|
||||
@ -81,19 +65,6 @@ struct ReplyMarkeMessageReadFail
|
||||
int32_t error;
|
||||
};
|
||||
|
||||
struct ReplyNoMessageInList
|
||||
{
|
||||
};
|
||||
|
||||
struct ThreadListItem
|
||||
{
|
||||
uint64_t id;
|
||||
nsString senderOrReceiver;
|
||||
uint64_t timestamp;
|
||||
nsString body;
|
||||
uint64_t unreadCount;
|
||||
};
|
||||
|
||||
struct ReplyThreadList
|
||||
{
|
||||
ThreadListItem[] items;
|
||||
@ -112,10 +83,6 @@ union MessageReply
|
||||
ReplyGetMessageFail;
|
||||
ReplyMessageDelete;
|
||||
ReplyMessageDeleteFail;
|
||||
ReplyNoMessageInList;
|
||||
ReplyCreateMessageList;
|
||||
ReplyCreateMessageListFail;
|
||||
ReplyGetNextMessage;
|
||||
ReplyMarkeMessageRead;
|
||||
ReplyMarkeMessageReadFail;
|
||||
ReplyThreadList;
|
||||
|
@ -36,6 +36,24 @@ struct SmsMessageData
|
||||
bool read;
|
||||
};
|
||||
|
||||
struct SmsFilterData
|
||||
{
|
||||
uint64_t startDate;
|
||||
uint64_t endDate;
|
||||
nsString[] numbers;
|
||||
DeliveryState delivery;
|
||||
ReadState read;
|
||||
};
|
||||
|
||||
struct ThreadListItem
|
||||
{
|
||||
uint64_t id;
|
||||
nsString senderOrReceiver;
|
||||
uint64_t timestamp;
|
||||
nsString body;
|
||||
uint64_t unreadCount;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user