Agenda

class Agenda

The agenda service.

This class allows performing agenda related actions like adding a new contact, updating an existing one or fetching the contacts from specific sources.

Functions

Link copied to clipboard
fun addListener(listener: AgendaListener)

Adds a listener to receive agenda events.

Link copied to clipboard
fun clearCache()

Marks the current cache as dirty. Any subsequent getContacts requests will fetch new data from the network data source.

Link copied to clipboard
fun createContact(contact: Contact, onCompletion: (SippoResourceError?) -> Unit)

Adds a new contact.

Link copied to clipboard
fun deleteContact(contact: Contact, onCompletion: (SippoResourceError?) -> Unit)

Deletes the specified contact.

Link copied to clipboard
fun getContactBy(contactId: String, onCompletion: (Either<Contact, SippoResourceError>) -> Unit)

Fetch contact from the specified contactId.

Link copied to clipboard
fun getContacts(query: SourceQuery, onCompletion: (Either<List<Contact>, SippoResourceError>) -> Unit)

Fetches all the contacts from the specified query.

Link copied to clipboard
fun getContactsByUserId(userId: String, onCompletion: (Either<List<Contact>, SippoResourceError>) -> Unit)

Fetches contacts from the specified userId.

Link copied to clipboard
fun removeListener(listener: AgendaListener)

Removes the specified listener.

Link copied to clipboard
fun updateContact(contact: Contact, onCompletion: (SippoResourceError?) -> Unit)

Updates an existing contact.

Properties

Link copied to clipboard
val rx: AgendaRx

Access to the reactive API of the service.