Confirmed users
368
edits
(→Proposed API: add SmsFilter and SmsIterator) |
|||
Line 24: | Line 24: | ||
void delete(in long uuid); | void delete(in long uuid); | ||
void delete(in SmsMessage uuid); | void delete(in SmsMessage uuid); | ||
SMSRequest (request.result == SMSIterator) get( | SMSRequest (request.result == SMSIterator) get(SMSFilter); | ||
}; | }; | ||
Line 54: | Line 54: | ||
* Add a status attribute that can be equals to SENT or RECEIVED? | * Add a status attribute that can be equals to SENT or RECEIVED? | ||
* Merge sender/receiver and use the status attribute? | * Merge sender/receiver and use the status attribute? | ||
interface SmsFilter { | |||
attribute long[] uuids; | |||
attribute long[] excludeUuids; | |||
Date startDate; | |||
Date endDate; | |||
DOMString[] numbers; | |||
DOMString body; | |||
}; | |||
Comments: | |||
* Maybe add a ''isRead'' field? | |||
* Add a ''type'' field that could be SMS or MMS; | |||
* Maybe add a ''status'' field that could be SENT or RECEIVED? | |||
* Can we make the ''body'' field better to allow AND/OR operations? | |||
interface SmsIterator { | |||
SmsFilter filter; | |||
SmsMessage? next(); | |||
SmsMessage? previous(); | |||
SmsMessage? first(); | |||
SmsMessage? last(); | |||
}; | |||
In addition of these interfaces, there is a new event: | In addition of these interfaces, there is a new event: |