/*
 * Copyright 2016 Peter Kenji Yamanaka
 *
 * 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.pyamsoft.powermanager.dagger.modifier.preference.periodic;

import android.content.Context;
import android.support.annotation.NonNull;
import com.pyamsoft.powermanager.PowerManagerPreferences;
import com.pyamsoft.powermanager.app.modifier.BooleanInterestModifier;
import dagger.Module;
import dagger.Provides;
import javax.inject.Named;
import javax.inject.Singleton;
import rx.Scheduler;

@Module public class PeriodicModifierModule {

  @Singleton @Named("mod_wifi_periodic") @Provides BooleanInterestModifier provideWifiModifier(
      @NonNull Context context, @NonNull PowerManagerPreferences preferences,
      @NonNull @Named("io") Scheduler subscribeScheduler,
      @NonNull @Named("main") Scheduler observeScheduler) {
    return new WifiPeriodicModifier(context, preferences, subscribeScheduler, observeScheduler);
  }

  @Singleton @Named("mod_data_periodic") @Provides BooleanInterestModifier provideDataModifier(
      @NonNull Context context, @NonNull PowerManagerPreferences preferences,
      @NonNull @Named("io") Scheduler subscribeScheduler,
      @NonNull @Named("main") Scheduler observeScheduler) {
    return new DataPeriodicModifier(context, preferences, subscribeScheduler, observeScheduler);
  }

  @Singleton @Named("mod_bluetooth_periodic") @Provides
  BooleanInterestModifier provideBluetoothModifier(@NonNull Context context,
      @NonNull PowerManagerPreferences preferences,
      @NonNull @Named("io") Scheduler subscribeScheduler,
      @NonNull @Named("main") Scheduler observeScheduler) {
    return new BluetoothPeriodicModifier(context, preferences, subscribeScheduler,
        observeScheduler);
  }

  @Singleton @Named("mod_sync_periodic") @Provides BooleanInterestModifier provideSyncModifier(
      @NonNull Context context, @NonNull PowerManagerPreferences preferences,
      @NonNull @Named("io") Scheduler subscribeScheduler,
      @NonNull @Named("main") Scheduler observeScheduler) {
    return new SyncPeriodicModifier(context, preferences, subscribeScheduler, observeScheduler);
  }
}

@@ -1236,34 +1236,43 @@
 NonNull @Named(%22
+computat
 io
+n
 %22) Scheduler sub
@@ -1639,34 +1639,43 @@
 NonNull @Named(%22
+computat
 io
+n
 %22) Scheduler sub
@@ -2053,34 +2053,43 @@
 NonNull @Named(%22
+computat
 io
+n
 %22) Scheduler sub
@@ -2477,18 +2477,27 @@
 @Named(%22
+computat
 io
+n
 %22) Sched

Fix scheduler name