/** * Get the API client for requests to the events API. * * @return the events API client */ public EventsRestClient getEventsApiClient() { checkIfAlive(); return mEventsRestClient; }
/** * Get the API client for requests to the Room Keys API. * * @return the Room Keys API client */ public RoomKeysRestClient getRoomKeysRestClient() { checkIfAlive(); return mRoomKeysRestClient; }
/** * Get the API client for requests to the rooms API. * * @return the rooms API client */ public RoomsRestClient getRoomsApiClient() { checkIfAlive(); return mRoomsRestClient; }
/** * Get the API client for requests to the presence API. * * @return the presence API client */ public PresenceRestClient getPresenceApiClient() { checkIfAlive(); return mPresenceRestClient; }
/** * Get the user credentials. * * @return the credentials */ public Credentials getCredentials() { checkIfAlive(); return mCredentials; }
/** * Get the content manager (for uploading and downloading content) associated with the session. * * @return the content manager */ public ContentManager getContentManager() { checkIfAlive(); return mContentManager; }
/** * Get the API client for requests to the profile API. * * @return the profile API client */ public ProfileRestClient getProfileApiClient() { checkIfAlive(); return mProfileRestClient; }
/** * Get the API client for requests to the bing rules API. * * @return the bing rules API client */ public PushRulesRestClient getBingRulesApiClient() { checkIfAlive(); return mPushRulesRestClient; }
/** * Get the data handler. * * @return the data handler. */ public MXDataHandler getDataHandler() { checkIfAlive(); return mDataHandler; }
public HomeServerConnectionConfig getHomeServerConfig() { checkIfAlive(); return mHsConfig; }
/** * Return the fulfilled active BingRule for the event. * * @param event the event * @return the fulfilled bingRule */ public BingRule fulfillRule(Event event) { checkIfAlive(); return mBingRulesManager.fulfilledBingRule(event); }
/** * Shorthand for {@link #startEventStream(EventsThreadListener, NetworkConnectivityReceiver, String)} with no eventListener * using a DataHandler and no specific failure callback. * * @param initialToken the initial sync token (null to sync from scratch). */ public void startEventStream(String initialToken) { checkIfAlive(); startEventStream(null, mNetworkConnectivityReceiver, initialToken); }
/** * Retrieve user matrix id from a 3rd party id. * * @param address the user id. * @param media the media. * @param callback the 3rd party callback */ public void lookup3Pid(String address, String media, final ApiCallback<String> callback) { checkIfAlive(); mThirdPidRestClient.lookup3Pid(address, media, callback); }
/** * Cancel any pending search request */ public void cancelSearchMessagesByText() { checkIfAlive(); mEventsRestClient.cancelSearchMessagesByText(); }
/** * Cancel any pending user search */ public void cancelUsersSearch() { checkIfAlive(); mEventsRestClient.cancelUsersSearch(); }
/** * Cancel any pending file search request */ public void cancelSearchMediaByText() { checkIfAlive(); mEventsRestClient.cancelSearchMediaByText(); }
/** * Get the session's current user. The MyUser object provides methods for updating user properties which are not possible for other users. * * @return the session's MyUser object */ public MyUser getMyUser() { checkIfAlive(); return mDataHandler.getMyUser(); }
/** * Set a global failure callback implementation. * * @param failureCallback the failure callback */ public void setFailureCallback(ApiFailureCallback failureCallback) { checkIfAlive(); mFailureCallback = failureCallback; if (mEventsThread != null) { mEventsThread.setFailureCallback(failureCallback); } }
/** * Retrieve user matrix id from a 3rd party id. * * @param addresses 3rd party ids * @param mediums the media. * @param callback the 3rd parties callback */ public void lookup3Pids(List<String> addresses, List<String> mediums, ApiCallback<List<String>> callback) { checkIfAlive(); mThirdPidRestClient.lookup3Pids(addresses, mediums, callback); }
/** * Get the session's current userid. * * @return the session's MyUser id */ public String getMyUserId() { checkIfAlive(); if (null != mDataHandler.getMyUser()) { return mDataHandler.getMyUser().user_id; } return null; }