463c95db14b326fe92055965b46574f64ab0837e
[pub/Android/ownCloud.git] / src / com / owncloud / android / authenticator / oauth2 / OnOAuth2GetCodeResultListener.java
1 package com.owncloud.android.authenticator.oauth2;
2
3 import org.json.JSONObject;
4
5 /**
6 * Listener that expects results from OAuth2GetCodeRunnable class.
7 *
8 * @author SolidGear S.L.
9 *
10 */
11 public interface OnOAuth2GetCodeResultListener {
12
13 enum ResultOAuthType {
14 OK_SSL, OK_NO_SSL, SSL_INIT_ERROR, HOST_NOT_AVAILABLE, TIMEOUT, NO_NETWORK_CONNECTION, INCORRECT_ADDRESS, INSTANCE_NOT_CONFIGURED, FILE_NOT_FOUND, UNKNOWN_ERROR, WRONG_CONNECTION, SSL_UNVERIFIED_SERVER, BAD_OC_VERSION
15 }
16
17 public void onOAuth2GetCodeResult(ResultOAuthType type, JSONObject code);
18
19 }