// Path: reactivefb/src/main/java/com/beltaief/reactivefb/actions/ReactiveLoginCallback.java
// public class ReactiveLoginCallback<T> implements FacebookCallback<T> {
// 
//     private MaybeEmitter<T> maybeEmitter;
//     boolean askPublishPermissions;
//     List<String> publishPermissions;
// 
//     @Override
//     public void onSuccess(T loginResult) {
//         maybeEmitter.onSuccess(loginResult);
//     }
// 
//     @Override
//     public void onCancel() {
//         maybeEmitter.onComplete();
//     }
// 
//     @Override
//     public void onError(FacebookException error) {
//         maybeEmitter.onError(new Throwable(error));
//     }
// 
//     public void setEmitter(MaybeEmitter<T> emitter) {
//         this.maybeEmitter = emitter;
//     }
// }
// 
// Path: reactivefb/src/main/java/com/beltaief/reactivefb/actions/ReactiveLoginWithButtonCallback.java
// public class ReactiveLoginWithButtonCallback<T> implements FacebookCallback<T> {
// 
//     private ObservableEmitter<T> maybeEmitter;
// 
//     @Override
//     public void onSuccess(T loginResult) {
//         maybeEmitter.onNext(loginResult);
//     }
// 
//     @Override
//     public void onCancel() {
//         maybeEmitter.onError(new FacebookException("user canceled the operation"));
//     }
// 
//     @Override
//     public void onError(FacebookException error) {
//         maybeEmitter.onError(new Throwable(error));
//     }
// 
//     public void setEmitter(ObservableEmitter<T> emitter) {
//         this.maybeEmitter = emitter;
//     }
// }


import android.app.Activity;
import com.beltaief.reactivefb.actions.ReactiveLoginCallback;
import com.beltaief.reactivefb.actions.ReactiveLoginWithButtonCallback;
import com.facebook.AccessToken;
import com.facebook.CallbackManager;
import com.facebook.login.LoginManager;
import com.facebook.login.LoginResult;
import java.lang.ref.WeakReference;
import java.util.List;
import io.reactivex.MaybeEmitter;
import io.reactivex.ObservableEmitter;
package com.beltaief.reactivefb;





/**
 * Created by wassim on 9/15/16.
 */
public class SessionManager {

    private WeakReference<Activity> mActivity;
    private static SimpleFacebookConfiguration configuration;
    private final LoginManager mLoginManager;
// Path: reactivefb/src/main/java/com/beltaief/reactivefb/actions/ReactiveLoginCallback.java
// public class ReactiveLoginCallback<T> implements FacebookCallback<T> {
// 
//     private MaybeEmitter<T> maybeEmitter;
//     boolean askPublishPermissions;
//     List<String> publishPermissions;
// 
//     @Override
//     public void onSuccess(T loginResult) {
//         maybeEmitter.onSuccess(loginResult);
//     }
// 
//     @Override
//     public void onCancel() {
//         maybeEmitter.onComplete();
//     }
// 
//     @Override
//     public void onError(FacebookException error) {
//         maybeEmitter.onError(new Throwable(error));
//     }
// 
//     public void setEmitter(MaybeEmitter<T> emitter) {
//         this.maybeEmitter = emitter;
//     }
// }
// 
// Path: reactivefb/src/main/java/com/beltaief/reactivefb/actions/ReactiveLoginWithButtonCallback.java
// public class ReactiveLoginWithButtonCallback<T> implements FacebookCallback<T> {
// 
//     private ObservableEmitter<T> maybeEmitter;
// 
//     @Override
//     public void onSuccess(T loginResult) {
//         maybeEmitter.onNext(loginResult);
//     }
// 
//     @Override
//     public void onCancel() {
//         maybeEmitter.onError(new FacebookException("user canceled the operation"));
//     }
// 
//     @Override
//     public void onError(FacebookException error) {
//         maybeEmitter.onError(new Throwable(error));
//     }
// 
//     public void setEmitter(ObservableEmitter<T> emitter) {
//         this.maybeEmitter = emitter;
//     }
// }


// Path: reactivefb/src/main/java/com/beltaief/reactivefb/SessionManager.java
import android.app.Activity;
import com.beltaief.reactivefb.actions.ReactiveLoginCallback;
import com.beltaief.reactivefb.actions.ReactiveLoginWithButtonCallback;
import com.facebook.AccessToken;
import com.facebook.CallbackManager;
import com.facebook.login.LoginManager;
import com.facebook.login.LoginResult;
import java.lang.ref.WeakReference;
import java.util.List;
import io.reactivex.MaybeEmitter;
import io.reactivex.ObservableEmitter;

package com.beltaief.reactivefb;





/**
 * Created by wassim on 9/15/16.
 */
public class SessionManager {

    private WeakReference<Activity> mActivity;
    private static SimpleFacebookConfiguration configuration;
    private final LoginManager mLoginManager;
    private final ReactiveLoginCallback<LoginResult> mLoginCallback = new ReactiveLoginCallback<>();