WebAPI/LogAPI: Difference between revisions
< WebAPI
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
DOMRequest remove(DOMString entryId); | DOMRequest remove(DOMString entryId); | ||
DOMRequest removeOld(DOMTimestamp to,optional DOMString contactId) | DOMRequest removeOld(DOMTimestamp to,optional DOMString contactId) | ||
DOMRequest getLast(unsigned long number,); | DOMRequest getLast(unsigned long number,LogOptions options); | ||
attribute maxEntriesPerDay; | attribute maxEntriesPerDay; | ||
| Line 23: | Line 23: | ||
attribute DOMString title; | attribute DOMString title; | ||
attribute DOMString description; | attribute DOMString description; | ||
attribute Object data; | |||
}; | }; | ||
Revision as of 12:15, 25 April 2012
Use Cases: To record the history of user activity with the device, particularly with communication services (Phone Calls, Messages, Social Networks, etc.)
interface LogsManager {
DOMRequest add(in LogEntry entry);
DOMRequest remove(DOMString entryId);
DOMRequest removeOld(DOMTimestamp to,optional DOMString contactId)
DOMRequest getLast(unsigned long number,LogOptions options);
attribute maxEntriesPerDay;
attribute maxEntriesPerUser;
};
dictionary LogOptions {
};
interface LogEntryProperties {
attribute DOMString type; // oneOf ['incoming', 'outgoing']
attribute DOMString contactId; // ContactId
attribute DOMString tel; // Tel number if not already in contacts
attribute DOMString objectId; // Object id (for example SMS message)
attribute DOMString service; // oneOf ['SMS', 'Telephony', 'Facebook']
attribute DOMString title;
attribute DOMString description;
attribute Object data;
};
[Constructor(in LogEntryProperties properties)]
interface LogEntry : LogEntryProperties {
readonly attribute DOMString id;
readonly attribute Date timestamp; // When this happened
};