// Path: app/src/main/java/mk/petrovski/weathergurumvp/data/remote/helper/CompositeDisposableHelper.java
// public class CompositeDisposableHelper {
// 
//   public CompositeDisposable disposables;
//   public BaseSchedulerProvider schedulerProvider;
// 
//   @Inject public CompositeDisposableHelper(CompositeDisposable disposables,
//       BaseSchedulerProvider schedulerProvider) {
//     this.disposables = disposables;
//     this.schedulerProvider = schedulerProvider;
//   }
// 
//   private final ObservableTransformer schedulersTransformer = new ObservableTransformer() {
//     @Override public ObservableSource apply(Observable upstream) {
//       return upstream.subscribeOn(schedulerProvider.io()).observeOn(schedulerProvider.ui());
//     }
//   };
// 
//   public <T> ObservableTransformer<T, T> applySchedulers() {
//     return (ObservableTransformer<T, T>) schedulersTransformer;
//   }
// 
//   public void addDisposable(Disposable disposable) {
//     disposables.add(disposable);
//   }
// 
//   public void dispose() {
//     if (!disposables.isDisposed()) {
//       disposables.dispose();
//     }
//   }
// 
//   public BaseSchedulerProvider getSchedulerProvider() {
//     return schedulerProvider;
//   }
// }
// 
// Path: app/src/main/java/mk/petrovski/weathergurumvp/utils/reactive/SchedulerProvider.java
// public class SchedulerProvider implements BaseSchedulerProvider {
// 
//   @Inject public SchedulerProvider() {
//   }
// 
//   @NonNull @Override public Scheduler io() {
//     return Schedulers.io();
//   }
// 
//   @NonNull @Override public Scheduler ui() {
//     return AndroidSchedulers.mainThread();
//   }
// 
//   @NonNull @Override public Scheduler computation() {
//     return Schedulers.computation();
//   }
// }


import dagger.Module;
import dagger.Provides;
import io.reactivex.disposables.CompositeDisposable;
import mk.petrovski.weathergurumvp.data.remote.helper.CompositeDisposableHelper;
import mk.petrovski.weathergurumvp.utils.reactive.SchedulerProvider;
package mk.petrovski.weathergurumvp.injection.module;


/**
 * Created by Nikola Petrovski on 2/23/2017.
 */

@Module public class RxModule {

  @Provides CompositeDisposable getCompositeDisposable() {
// Path: app/src/main/java/mk/petrovski/weathergurumvp/data/remote/helper/CompositeDisposableHelper.java
// public class CompositeDisposableHelper {
// 
//   public CompositeDisposable disposables;
//   public BaseSchedulerProvider schedulerProvider;
// 
//   @Inject public CompositeDisposableHelper(CompositeDisposable disposables,
//       BaseSchedulerProvider schedulerProvider) {
//     this.disposables = disposables;
//     this.schedulerProvider = schedulerProvider;
//   }
// 
//   private final ObservableTransformer schedulersTransformer = new ObservableTransformer() {
//     @Override public ObservableSource apply(Observable upstream) {
//       return upstream.subscribeOn(schedulerProvider.io()).observeOn(schedulerProvider.ui());
//     }
//   };
// 
//   public <T> ObservableTransformer<T, T> applySchedulers() {
//     return (ObservableTransformer<T, T>) schedulersTransformer;
//   }
// 
//   public void addDisposable(Disposable disposable) {
//     disposables.add(disposable);
//   }
// 
//   public void dispose() {
//     if (!disposables.isDisposed()) {
//       disposables.dispose();
//     }
//   }
// 
//   public BaseSchedulerProvider getSchedulerProvider() {
//     return schedulerProvider;
//   }
// }
// 
// Path: app/src/main/java/mk/petrovski/weathergurumvp/utils/reactive/SchedulerProvider.java
// public class SchedulerProvider implements BaseSchedulerProvider {
// 
//   @Inject public SchedulerProvider() {
//   }
// 
//   @NonNull @Override public Scheduler io() {
//     return Schedulers.io();
//   }
// 
//   @NonNull @Override public Scheduler ui() {
//     return AndroidSchedulers.mainThread();
//   }
// 
//   @NonNull @Override public Scheduler computation() {
//     return Schedulers.computation();
//   }
// }


// Path: app/src/main/java/mk/petrovski/weathergurumvp/injection/module/RxModule.java
import dagger.Module;
import dagger.Provides;
import io.reactivex.disposables.CompositeDisposable;
import mk.petrovski.weathergurumvp.data.remote.helper.CompositeDisposableHelper;
import mk.petrovski.weathergurumvp.utils.reactive.SchedulerProvider;

package mk.petrovski.weathergurumvp.injection.module;


/**
 * Created by Nikola Petrovski on 2/23/2017.
 */

@Module public class RxModule {

  @Provides CompositeDisposable getCompositeDisposable() {
    return new CompositeDisposable();