nsISmsRequestManager

nsISmsRequestManager

Used to manage SMS related requests and notifications 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/smsrequestmanager;1. To create an instance, use:

var smsRequestManager = Components.classes["@mozilla.org/sms/smsrequestmanager;1"]
                        .createInstance(Components.interfaces.nsISmsRequestManager);

Method overview

long addRequest(in nsIDOMMozSmsRequest aRequest);
long createRequest(in nsIDOMMozSmsManager aManager, out nsIDOMMozSmsRequest aRequest);
void notifyCreateMessageList(in long aRequestId, in long aListId, in nsIDOMMozSmsMessage aMessage);
void notifyGetSmsFailed(in long aRequestId, in long aError);
void notifyGotNextMessage(in long aRequestId, in nsIDOMMozSmsMessage aMessage);
void notifyGotSms(in long aRequestId, in nsIDOMMozSmsMessage aMessage);
void notifyMarkedMessageRead(in long aRequestId, in bool aRead);
void notifyMarkMessageReadFailed(in long aRequestId, in long aError);
void notifyNoMessageInList(in long aRequestId);
void notifyReadMessageListFailed(in long aRequestId, in long aError);
void notifySmsDeleted(in long aRequestId, in bool aDeleted);
void notifySmsDeleteFailed(in long aRequestId, in long aError);
void notifySmsSendFailed(in long aRequestId, in long aError);
void notifySmsSent(in long aRequestId, in nsIDOMMozSmsMessage aMessage);

Constants

All SMS related errors that could apply to SmsRequest objects.

Constant Value Description
SUCCESS_NO_ERROR 0
NO_SIGNAL_ERROR 1
NOT_FOUND_ERROR 2
UNKNOWN_ERROR 3
INTERNAL_ERROR 4

Methods

addRequest()

Track an already existing request object.

long addRequest(
  in nsIDOMMozSmsRequest aRequest
);
Parameters
aRequest
An SmsRequest.
Return value

The request ID.

createRequest()

Create a new request object.

long createRequest(
  in nsIDOMMozSmsManager aManager,
  out nsIDOMMozSmsRequest aRequest
);
Parameters
aManager
An SmsManager.
aRequest
An SmsRequest.
Return value

The request ID.

notifyCreateMessageList()

void notifyCreateMessageList(
  in long aRequestId,
  in long aListId,
  in nsIDOMMozSmsMessage aMessage
);
Parameters
aRequestId
A number representing the id of the request.
aListId
A number representing the id of the list.
aMessage
An SmsMessage.

notifyGetSmsFailed()

void notifyGetSmsFailed(
  in long aRequestId,
  in long aError
);
Parameters
aRequestId
A number representing the id of the request.
aError
A number with an error code. See constants.

notifyGotNextMessage()

void notifyGotNextMessage(
  in long aRequestId,
  in nsIDOMMozSmsMessage aMessage
);
Parameters
aRequestId
A number representing the id of the request.
aMessage
An SmsMessage.

notifyGotSms()

void notifyGotSms(
  in long aRequestId,
  in nsIDOMMozSmsMessage aMessage
);
Parameters
aRequestId
A number representing the id of the request.
aMessage
An SmsMessage.

notifyMarkedMessageRead()

Requires Gecko 15.0(Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12)

void notifyMarkedMessageRead(
  in long aRequestId
  in bool aRead
);
Parameters
aRequestId
A number representing the id of the request.
aRead
A Boolean indicating whether a message is read or unread.

notifyMarkMessageReadFailed()

Requires Gecko 15.0(Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12)

void notifyMarkMessageReadFailed(
  in long aRequestId
  in long aError
);
Parameters
aRequestId
A number representing the id of the request.
aError
A number with an error code. See constants.

notifyNoMessageInList()

void notifyNoMessageInList(
  in long aRequestId
);
Parameters
aRequestId
A number representing the id of the request.

notifyReadMessageListFailed()

void notifyReadMessageListFailed(
  in long aRequestId,
  in long aError
);
Parameters
aRequestId
A number representing the id of the request.
aError
A number with an error code. See constants.

notifySmsDeleted()

void notifySmsDeleted(
  in long aRequestId,
  in bool aDeleted
);
Parameters
aRequestId
A number representing the id of the request.
aDeleted
A Boolean indictating whether the SMS is deleted.

notifySmsDeleteFailed()

void notifySmsDeleteFailed(
  in long aRequestId,
  in long aError
);
Parameters
aRequestId
A number representing the id of the request.
aError
A number with an error code. See constants.

notifySmsSendFailed()

void notifySmsSendFailed(
  in long aRequestId,
  in long aError
);
Parameters
aRequestId
A number representing the id of the request.
aError
A number with an error code. See constants.

notifySmsSent()

void notifySmsSent(
  in long aRequestId,
  in nsIDOMMozSmsMessage aMessage
);
Parameters
aRequestId
A number representing the id of the request.
aMessage
An SmsMessage.

See also

  • SmsRequest