Search in sources :

Example 26 with ServiceEvent

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);
}
Also used : ServiceEvent(cx.ring.model.ServiceEvent)

Example 27 with ServiceEvent

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);
}
Also used : Account(cx.ring.model.Account) ServiceEvent(cx.ring.model.ServiceEvent)

Example 28 with ServiceEvent

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);
}
Also used : ServiceEvent(cx.ring.model.ServiceEvent)

Example 29 with ServiceEvent

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);
}
Also used : ServiceEvent(cx.ring.model.ServiceEvent)

Example 30 with ServiceEvent

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);
    }
}
Also used : Account(cx.ring.model.Account) ServiceEvent(cx.ring.model.ServiceEvent)

Aggregations

ServiceEvent (cx.ring.model.ServiceEvent)43 Account (cx.ring.model.Account)13 DataTransfer (cx.ring.model.DataTransfer)4 HistoryText (cx.ring.model.HistoryText)4 TextMessage (cx.ring.model.TextMessage)4 SQLException (java.sql.SQLException)4 SurfaceHolder (android.view.SurfaceHolder)3 CallContact (cx.ring.model.CallContact)3 Conversation (cx.ring.model.Conversation)3 HistoryCall (cx.ring.model.HistoryCall)3 SipCall (cx.ring.model.SipCall)3 Uri (cx.ring.model.Uri)3 IOException (java.io.IOException)3 Camera (android.hardware.Camera)2 StringMap (cx.ring.daemon.StringMap)2 DataTransferEventCode (cx.ring.model.DataTransferEventCode)2 ArrayList (java.util.ArrayList)2 Map (java.util.Map)2 Point (android.graphics.Point)1 DataTransferInfo (cx.ring.daemon.DataTransferInfo)1