// Path: rx/src/main/java/com/christianbahl/appkit/rx/CBObservableTransformer.java
// public class CBObservableTransformer<T> implements Observable.Transformer<T, T> {
//   @NonNull public Observable<T> call(Observable<T> observable) {
//     return observable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
//   }
// }


import android.support.annotation.NonNull;
import com.christianbahl.appkit.rx.CBObservableTransformer;
import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.hannesdorfmann.mosby3.mvp.lce.MvpLceView;
import rx.Observable;
import rx.Subscriber;
import rx.subscriptions.CompositeSubscription;
/*
 * Copyright 2015 Christian Bahl
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.christianbahl.appkit.rx.presenter;


/**
 * <p>
 * Mvp Lce presenter which handles subscribing and unsubscribing for {@link Observable}.
 * </p>
 *
 * <p>
 * The functions for Lce are called automatically when calling {@link #subscribe(Observable, boolean)}.
 * </p>
 *
 * @author Christian Bahl
 * @see MvpBasePresenter
 */
public class CBLceRxPresenter<V extends MvpLceView<M>, M> extends MvpBasePresenter<V> {

  protected CompositeSubscription compositeSubscription;
  protected CBObservableTransformer<M> transformer;

  public CBLceRxPresenter() {
// Path: rx/src/main/java/com/christianbahl/appkit/rx/CBObservableTransformer.java
// public class CBObservableTransformer<T> implements Observable.Transformer<T, T> {
//   @NonNull public Observable<T> call(Observable<T> observable) {
//     return observable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
//   }
// }


// Path: rx/src/main/java/com/christianbahl/appkit/rx/presenter/CBLceRxPresenter.java
import android.support.annotation.NonNull;
import com.christianbahl.appkit.rx.CBObservableTransformer;
import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.hannesdorfmann.mosby3.mvp.lce.MvpLceView;
import rx.Observable;
import rx.Subscriber;
import rx.subscriptions.CompositeSubscription;

/*
 * Copyright 2015 Christian Bahl
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.christianbahl.appkit.rx.presenter;


/**
 * <p>
 * Mvp Lce presenter which handles subscribing and unsubscribing for {@link Observable}.
 * </p>
 *
 * <p>
 * The functions for Lce are called automatically when calling {@link #subscribe(Observable, boolean)}.
 * </p>
 *
 * @author Christian Bahl
 * @see MvpBasePresenter
 */
public class CBLceRxPresenter<V extends MvpLceView<M>, M> extends MvpBasePresenter<V> {

  protected CompositeSubscription compositeSubscription;
  protected CBObservableTransformer<M> transformer;

  public CBLceRxPresenter() {
    this.transformer = new CBObservableTransformer<>();