gecko/dom/sms/interfaces/nsISmsService.idl
2013-01-04 14:26:20 +08:00

42 lines
1.6 KiB
Plaintext

/* 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 nsIDOMMozSmsMessage;
interface nsIDOMMozSmsSegmentInfo;
interface nsISmsRequest;
%{C++
#define SMS_SERVICE_CID { 0xbada3cb8, 0xa568, 0x4dff, { 0xb5, 0x43, 0x52, 0xbb, 0xb3, 0x14, 0x31, 0x21 } }
#define SMS_SERVICE_CONTRACTID "@mozilla.org/sms/smsservice;1"
%}
[scriptable, builtinclass, uuid(4310bdb5-eefa-4f70-965a-74041228ab26)]
interface nsISmsService : nsISupports
{
boolean hasSupport();
nsIDOMMozSmsSegmentInfo getSegmentInfoForText(in DOMString text);
void send(in DOMString number,
in DOMString message,
in nsISmsRequest request);
[implicit_jscontext]
nsIDOMMozSmsMessage createSmsMessage(in long id,
in DOMString delivery,
in DOMString deliveryStatus,
in DOMString sender,
in DOMString receiver,
in DOMString body,
in DOMString messageClass,
in jsval timestamp,
in bool read);
nsIDOMMozSmsSegmentInfo createSmsSegmentInfo(in long segments,
in long charsPerSegment,
in long charsAvailableInLastSegment);
};