diff -r 000000000000 -r 6474c204b198 dom/mobilemessage/interfaces/nsISmsService.idl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dom/mobilemessage/interfaces/nsISmsService.idl Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,36 @@ +/* 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 nsIMobileMessageCallback; + +%{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(cb7d7b60-01f1-4241-a0ae-2ff035c3fbe5)] +interface nsISmsService : nsISupports +{ + readonly attribute unsigned long smsDefaultServiceId; + + void getSegmentInfoForText(in DOMString text, + in nsIMobileMessageCallback request); + + void send(in unsigned long serviceId, + in DOMString number, + in DOMString message, + in boolean silent, + in nsIMobileMessageCallback request); + + boolean isSilentNumber(in DOMString number); + void addSilentNumber(in DOMString number); + void removeSilentNumber(in DOMString number); + + void getSmscAddress(in unsigned long serviceId, + in nsIMobileMessageCallback request); +};