use of cx.ring.model.ServiceEvent in project ring-client-android by savoirfairelinux.
the class AccountService method errorAlert.
public void errorAlert(int alert) {
Log.d(TAG, "errorAlert : " + alert);
setChanged();
ServiceEvent event = new ServiceEvent(ServiceEvent.EventType.ERROR_ALERT);
event.addEventInput(ServiceEvent.EventInput.ALERT, alert);
notifyObservers(event);
}
use of cx.ring.model.ServiceEvent in project ring-client-android by savoirfairelinux.
the class AccountService method contactRemoved.
public void contactRemoved(String accountId, String uri, boolean banned) {
Log.d(TAG, "contactRemoved: " + accountId + ", " + uri + ", " + banned);
Account account = getAccount(accountId);
if (account == null) {
Log.d(TAG, "contactRemoved: unknown account" + accountId);
return;
}
account.removeContact(uri, banned);
setChanged();
ServiceEvent event = new ServiceEvent(ServiceEvent.EventType.CONTACT_REMOVED);
event.addEventInput(ServiceEvent.EventInput.ACCOUNT_ID, accountId);
event.addEventInput(ServiceEvent.EventInput.BANNED, banned);
notifyObservers(event);
}
use of cx.ring.model.ServiceEvent in project ring-client-android by savoirfairelinux.
the class AccountService method migrationEnded.
public void migrationEnded(String accountId, String state) {
Log.d(TAG, "migrationEnded: " + accountId + ", " + state);
setChanged();
ServiceEvent event = new ServiceEvent(ServiceEvent.EventType.MIGRATION_ENDED);
event.addEventInput(ServiceEvent.EventInput.ACCOUNT_ID, accountId);
event.addEventInput(ServiceEvent.EventInput.STATE, state);
notifyObservers(event);
}
use of cx.ring.model.ServiceEvent in project ring-client-android by savoirfairelinux.
the class AccountService method exportOnRingEnded.
public void exportOnRingEnded(String accountId, int code, String pin) {
Log.d(TAG, "exportOnRingEnded: " + accountId + ", " + code + ", " + pin);
setChanged();
ServiceEvent event = new ServiceEvent(ServiceEvent.EventType.EXPORT_ON_RING_ENDED);
event.addEventInput(ServiceEvent.EventInput.ACCOUNT_ID, accountId);
event.addEventInput(ServiceEvent.EventInput.CODE, code);
event.addEventInput(ServiceEvent.EventInput.PIN, pin);
notifyObservers(event);
}
use of cx.ring.model.ServiceEvent in project ring-client-android by savoirfairelinux.
the class AccountService method knownDevicesChanged.
public void knownDevicesChanged(String accountId, StringMap devices) {
Log.d(TAG, "knownDevicesChanged: " + accountId + ", " + devices);
Account accountChanged = getAccount(accountId);
if (accountChanged != null) {
accountChanged.setDevices(devices.toNative());
setChanged();
ServiceEvent event = new ServiceEvent(ServiceEvent.EventType.KNOWN_DEVICES_CHANGED);
event.addEventInput(ServiceEvent.EventInput.ACCOUNT_ID, accountId);
event.addEventInput(ServiceEvent.EventInput.DEVICES, devices);
notifyObservers(event);
}
}
Aggregations