WebAPI/LogAPI: Difference between revisions
< WebAPI
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Use Cases: To record the history of user activity with the | Use Cases: To record the history of user activity with the device, particularly with communication services (Phone Calls, Messages, Social Networks, etc.) | ||
<pre> | <pre> | ||
Line 20: | Line 20: | ||
attribute DOMString title; | attribute DOMString title; | ||
attribute DOMString description; | attribute DOMString description; | ||
} | } | ||
[Constructor(in LogEntryProperties properties)] | |||
interface LogEntry : LogEntryProperties { | interface LogEntry : LogEntryProperties { | ||
readonly attribute DOMString id; | |||
readonly attribute Date timestamp; // When this happened | |||
} | } | ||
</pre> | </pre> |
Revision as of 12:11, 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,); attribute maxEntriesPerDay; attribute maxEntriesPerUser; } 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; } [Constructor(in LogEntryProperties properties)] interface LogEntry : LogEntryProperties { readonly attribute DOMString id; readonly attribute Date timestamp; // When this happened }