nsISmsDatabaseService 编辑
nsISmsDatabaseService
dom/sms/interfaces/nsISmsDatabaseService.idl
Scriptable Used to store and manage SMS text messages for the WebSMS API 1.0 66 Introduced Gecko 13.0 Inherits from: nsISupports
Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12)Implemented by: @mozilla.org/sms/smsdatabaseservice;1
. To create an instance, use:
var smsService = Components.classes["@mozilla.org/sms/smsdatabaseservice;1"] .createInstance(Components.interfaces.nsISmsDatabaseService);
Method overview
long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate); |
long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate); |
void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId); |
void deleteMessage(in long messageId, in long requestId, [optional] in unsigned long long processId); |
void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId); |
void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId); |
void clearMessageList(in long listId); |
void markMessageRead(in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId) |
Methods
saveReceivedMessage()
void saveReceivedMessage( in DOMString aSender, in DOMString aBody, in unsigned long long aDate );
Parameters
aSender
- A
DOMString
with the sender of the text message. aBody
- A
DOMString
containing the body text of the message. aDate
- The timestamp of the message.
saveSentMessage()
void saveSentMessage( in DOMString a Receiver, in DOMString aBody, in unsigned long long aDate );
Parameters
aReceiver
- A
DOMString
with the receiver of the text message. aBody
- A
DOMString
containing the body text of the message. aDate
- The timestamp of the message.
getMessage()
void getMessage( in long messageId, in long requestId, [optional] in unsigned long long processId );
Parameters
messageId
- A number representing the id of the message.
requestId
- A number representing the id of the request.
processId
Optional- A number representing the id of the process.
deleteMessage()
void deleteMessage( in long messageId, in long requestId, [optional] in unsigned long long processId );
Parameters
messageId
- A number representing the id of the message.
requestId
- A number representing the id of the request.
processId
Optional- A number representing the id of the process.
createMessageList()
void createMessageList( in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId );
Parameters
filter
- A
SmsFilter
to filter out SMS messages from a list. reverse
- A Boolean indicating whether to reverse the ordering.
requestId
- A number representing the id of the request.
processId
Optional- A number representing the id of the process.
getNextMessageInList()
void getNextMessageInList( in long listId, in long requestId, [optional] in unsigned long long processId );
Parameters
listId
- A number representing the id of the message list.
requestId
- A number representing the id of the request.
processId
Optional- A number representing the id of the process.
markMessageRead()
clearMessageList()
void getNextMessageInList( in long listId, );
Parameters
listId
- A number representing the id of the message list.
void markMessageRead( in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId );
Parameters
messageId
- A number representing the id of the message.
value
- A Boolean indicating whether a message is read or unread.
requestId
- A number representing the id of the request.
processId
Optional- A number representing the id of the process.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论