// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/authorize/IAuthorize.java
// public interface IAuthorize extends IResult {
//     void authorize(OnCallback<String> callback);
// }
// 
// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/sdk/OnCallback.java
// public interface OnCallback<T> {
//     void onStarted(Activity activity);
//     void onCompleted(Activity activity);
//     void onSucceed(Activity activity, T result);
//     void onFailed(Activity activity, int code, String message);
// }
// 
// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/sdk/Platform.java
// public class Platform {
//     final String name;
//     final String appId;
// 
//     Map<String, String> extra;
// 
//     public Platform(@NonNull String name, @NonNull String appId) {
//         this.name = name;
//         this.appId = appId;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getAppId() {
//         return appId;
//     }
// 
//     public String extra(String key) {
//         return extra == null ? "" : extra.get(key);
//     }
// 
//     public Platform extra(String key, String value) {
//         if (extra == null) {
//             extra = new HashMap<>();
//         }
//         extra.put(key, value);
//         return this;
//     }
// }
// 
// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/sdk/ResultCode.java
// public class ResultCode {
//     public static final int RESULT_OK = 0;
//     public static final int RESULT_PENDING = 1;
//     public static final int RESULT_CANCELLED = 2;
//     public static final int RESULT_FAILED = 3;
// 
// }


import android.app.Activity;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.Log;
import com.tencent.connect.common.Constants;
import com.tencent.tauth.IUiListener;
import com.tencent.tauth.Tencent;
import com.tencent.tauth.UiError;
import org.json.JSONObject;
import ezy.sdk3rd.social.authorize.IAuthorize;
import ezy.sdk3rd.social.sdk.OnCallback;
import ezy.sdk3rd.social.sdk.Platform;
import ezy.sdk3rd.social.sdk.ResultCode;
package ezy.sdk3rd.social.platforms.qq;





/**
 * Created by ezy on 17/3/18.
 */

public class QQAuth implements IAuthorize {
    public static final String TAG = "ezy.sdk3rd.qq.auth";

    Activity mActivity;
    Platform mPlatform;
    Tencent mApi;

    IUiListener mListener;

// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/authorize/IAuthorize.java
// public interface IAuthorize extends IResult {
//     void authorize(OnCallback<String> callback);
// }
// 
// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/sdk/OnCallback.java
// public interface OnCallback<T> {
//     void onStarted(Activity activity);
//     void onCompleted(Activity activity);
//     void onSucceed(Activity activity, T result);
//     void onFailed(Activity activity, int code, String message);
// }
// 
// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/sdk/Platform.java
// public class Platform {
//     final String name;
//     final String appId;
// 
//     Map<String, String> extra;
// 
//     public Platform(@NonNull String name, @NonNull String appId) {
//         this.name = name;
//         this.appId = appId;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getAppId() {
//         return appId;
//     }
// 
//     public String extra(String key) {
//         return extra == null ? "" : extra.get(key);
//     }
// 
//     public Platform extra(String key, String value) {
//         if (extra == null) {
//             extra = new HashMap<>();
//         }
//         extra.put(key, value);
//         return this;
//     }
// }
// 
// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/sdk/ResultCode.java
// public class ResultCode {
//     public static final int RESULT_OK = 0;
//     public static final int RESULT_PENDING = 1;
//     public static final int RESULT_CANCELLED = 2;
//     public static final int RESULT_FAILED = 3;
// 
// }


// Path: ezy.sdk3rd.social/src/main/java/ezy/sdk3rd/social/platforms/qq/QQAuth.java
import android.app.Activity;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.Log;
import com.tencent.connect.common.Constants;
import com.tencent.tauth.IUiListener;
import com.tencent.tauth.Tencent;
import com.tencent.tauth.UiError;
import org.json.JSONObject;
import ezy.sdk3rd.social.authorize.IAuthorize;
import ezy.sdk3rd.social.sdk.OnCallback;
import ezy.sdk3rd.social.sdk.Platform;
import ezy.sdk3rd.social.sdk.ResultCode;

package ezy.sdk3rd.social.platforms.qq;





/**
 * Created by ezy on 17/3/18.
 */

public class QQAuth implements IAuthorize {
    public static final String TAG = "ezy.sdk3rd.qq.auth";

    Activity mActivity;
    Platform mPlatform;
    Tencent mApi;

    IUiListener mListener;

    QQAuth(Activity activity, Platform platform) {