Search in sources :

Example 11 with LoginEngine

use of com.vodafone360.people.engine.login.LoginEngine in project 360-Engine-for-Android by 360.

the class Auth method getPublicKey.

/**
 * Implementation of "auth/getpublickey" API.
 *
 * @param engine Handle to LoginEngine which handles requests using this
 *            API.
 * @return Request ID generated for this request.
 * @throws NullPointerException when engine is NULL
 */
public static int getPublicKey(BaseEngine engine) {
    if (engine == null) {
        throw new NullPointerException("Auth.getPublicKey() engine cannot be NULL");
    }
    Request request = new Request(FUNCTION_GET_PUBLIC_KEY, Request.Type.RETRIEVE_PUBLIC_KEY, engine.engineId(), false, Settings.API_REQUESTS_TIMEOUT_AUTH);
    request.addData("type", "all");
    QueueManager queue = QueueManager.getInstance();
    int requestId = queue.addRequest(request);
    queue.fireQueueStateChanged();
    return requestId;
}
Also used : Request(com.vodafone360.people.service.io.Request) QueueManager(com.vodafone360.people.service.io.QueueManager)

Example 12 with LoginEngine

use of com.vodafone360.people.engine.login.LoginEngine in project 360-Engine-for-Android by 360.

the class EngineManager method createLoginEngine.

/**
 * Create instance of LoginEngine.
 */
private synchronized void createLoginEngine() {
    final MainApplication app = (MainApplication) mService.getApplication();
    mLoginEngine = new LoginEngine(mService, mUiEventCallback, app.getDatabase());
    addEngine(mLoginEngine);
}
Also used : LoginEngine(com.vodafone360.people.engine.login.LoginEngine) MainApplication(com.vodafone360.people.MainApplication)

Aggregations

Request (com.vodafone360.people.service.io.Request)9 QueueManager (com.vodafone360.people.service.io.QueueManager)8 LoginEngine (com.vodafone360.people.engine.login.LoginEngine)3 MainApplication (com.vodafone360.people.MainApplication)1