WebAPI/LogAPI: Difference between revisions

Line 14: Line 14:


<pre>
<pre>
 
interface LogManager : EventTarget {
interface LogManager : EventTarget  
     DOMRequest put(LogEntry entry);
  {
     DOMRequest save(LogEntry entry);
     DOMRequest delete(DOMString entryId);
     DOMRequest delete(DOMString entryId);
     DOMRequest clear(LogClearOptions coptions);
     DOMRequest clear(LogClearOptions coptions);
     LogIterator find(LogFindOptions options);
     DOMRequest find(LogFindOptions options);       // Entries are always returned ordered by
   attribute Function onentryadded;
   attribute Function onentryadded;
  };
  };
Line 27: Line 25:
{
{
   DOMRequest next(optional unsigned short n);
   DOMRequest next(optional unsigned short n);
   DOMRequest advance(unsigned short count);
   attribute unsigned long position;
};
};
dictionary LogOptions
 
{
 
  attribute unsigned long maxRecords;
dictionary LogFindOptions  
  attribute DOMString contactId;
};
dictionary LogFindOptions : LogOptions
{
{
  attribute unsigned long maxRecords;
  attribute DOMString contactId;
   attribute Date from;
   attribute Date from;
   attribute Date to;
   attribute Date to;
   attribute DOMString service;
   attribute DOMString service;
};
};
interface LogEntryProperties  
interface LogEntryProperties  
{
{
   attribute DOMString type;                      // possible values: ['incoming', 'outgoing', 'missing']
   attribute DOMString type;                      // possible values: ['incoming', 'outgoing'']
  attribute DOMString status;                    // [missed, new]
   attribute DOMString[] contactId;            // ContactId
   attribute DOMString[] contactId;            // ContactId
   attribute DOMString[] tel;                      // Tel number if not already in contacts
   attribute DOMString[] tel;                      // Tel number if not in contacts
   attribute DOMString objectId;                // Object id (for example SMS message on the SMS database)
   attribute DOMString objectId;                // Object id (for example SMS message on the SMS database)
   attribute DOMString service;                  // oneOf ['SMS', 'Telephony', 'Facebook', 'Twitter']  
   attribute DOMString service;                  // oneOf ['SMS', 'Telephony', 'Facebook', 'Twitter']  
Line 51: Line 50:
   attribute any extra;                                // Any extra data to be used by applications
   attribute any extra;                                // Any extra data to be used by applications
};
};
[Constructor(LogEntryProperties properties)]
[Constructor(LogEntryProperties properties)]
interface LogEntry : LogEntryProperties  
interface LogEntry : LogEntryProperties  
172

edits