aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r--src/org/traccar/MainModule.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java
index 16a78b109..b459d824d 100644
--- a/src/org/traccar/MainModule.java
+++ b/src/org/traccar/MainModule.java
@@ -27,6 +27,7 @@ import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
import org.traccar.database.GeofenceManager;
import org.traccar.database.IdentityManager;
+import org.traccar.database.MaintenancesManager;
import org.traccar.database.StatisticsManager;
import org.traccar.geocoder.AddressFormat;
import org.traccar.geocoder.BanGeocoder;
@@ -63,6 +64,7 @@ import org.traccar.handler.events.CommandResultEventHandler;
import org.traccar.handler.events.FuelDropEventHandler;
import org.traccar.handler.events.GeofenceEventHandler;
import org.traccar.handler.events.IgnitionEventHandler;
+import org.traccar.handler.events.MaintenanceEventHandler;
import org.traccar.handler.events.MotionEventHandler;
import org.traccar.handler.events.OverspeedEventHandler;
import org.traccar.reports.model.TripsConfig;
@@ -122,6 +124,11 @@ public class MainModule extends AbstractModule {
return Context.getAttributesManager();
}
+ @Provides
+ public static MaintenancesManager provideMaintenancesManager() {
+ return Context.getMaintenancesManager();
+ }
+
@Singleton
@Provides
public static StatisticsManager provideStatisticsManager(Config config, DataManager dataManager, Client client) {
@@ -344,6 +351,13 @@ public class MainModule extends AbstractModule {
return new IgnitionEventHandler(identityManager);
}
+ @Singleton
+ @Provides
+ public static MaintenanceEventHandler provideMaintenanceEventHandler(
+ IdentityManager identityManager, MaintenancesManager maintenancesManager) {
+ return new MaintenanceEventHandler(identityManager, maintenancesManager);
+ }
+
@Override
protected void configure() {
binder().requireExplicitBindings();