public void onAccountInfoUpdate(final MyUser myUser) { mMxEventDispatcher.dispatchOnAccountInfoUpdate(myUser); }
public void onBingRulesUpdate() { mMxEventDispatcher.dispatchOnBingRulesUpdate(); }
public void onCryptoSyncComplete() { mMxEventDispatcher.dispatchOnCryptoSyncComplete(); }
public void onDirectMessageChatRoomsListUpdate() { mMxEventDispatcher.dispatchOnDirectMessageChatRoomsListUpdate(); }
public void onEventDecrypted(final Event event) { mMxEventDispatcher.dispatchOnEventDecrypted(event); }
public void onBingEvent(final Event event, final RoomState roomState, final BingRule bingRule) { mMxEventDispatcher.dispatchOnBingEvent(event, roomState, bingRule, ignoreEvent(event.roomId)); }
/** * Default constructor. * * @param store the data storage implementation. * @param credentials the credentials */ public MXDataHandler(IMXStore store, Credentials credentials) { mStore = store; mCredentials = credentials; mMxEventDispatcher = new MxEventDispatcher(); mSyncHandlerThread = new HandlerThread("MXDataHandler" + mCredentials.userId, Thread.MIN_PRIORITY); mSyncHandlerThread.start(); mSyncHandler = new MXOsHandler(mSyncHandlerThread.getLooper()); mLeftRoomsStore = new MXMemoryStore(credentials, store.getContext()); }
/** * Add a listener to the listeners list. * * @param listener the listener to add. */ public void addListener(IMXEventListener listener) { if (isAlive() && (null != listener)) { synchronized (mMxEventDispatcher) { mMxEventDispatcher.addListener(listener); } if (null != mInitialSyncToToken) { listener.onInitialSyncComplete(mInitialSyncToToken); } } }
/** * Clear the instance data. */ public void clear() { synchronized (mMxEventDispatcher) { mIsAlive = false; // remove any listener mMxEventDispatcher.clearListeners(); } // clear the store mStore.close(); mStore.clear(); if (null != mSyncHandlerThread) { mSyncHandlerThread.quit(); mSyncHandlerThread = null; } }
mMxEventDispatcher.dispatchOnAccountDataUpdate();