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 10d35f72f..fd49fe3b5 100644
--- a/src/org/traccar/MainModule.java
+++ b/src/org/traccar/MainModule.java
@@ -22,6 +22,7 @@ import com.google.inject.Singleton;
import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.AttributesManager;
+import org.traccar.database.CalendarManager;
import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
import org.traccar.database.GeofenceManager;
@@ -58,6 +59,7 @@ import org.traccar.handler.MotionHandler;
import org.traccar.handler.RemoteAddressHandler;
import org.traccar.handler.events.CommandResultEventHandler;
import org.traccar.handler.events.FuelDropEventHandler;
+import org.traccar.handler.events.GeofenceEventHandler;
import org.traccar.handler.events.MotionEventHandler;
import org.traccar.handler.events.OverspeedEventHandler;
import org.traccar.reports.model.TripsConfig;
@@ -108,6 +110,11 @@ public class MainModule extends AbstractModule {
}
@Provides
+ public static CalendarManager provideCalendarManager() {
+ return Context.getCalendarManager();
+ }
+
+ @Provides
public static AttributesManager provideAttributesManager() {
return Context.getAttributesManager();
}
@@ -306,6 +313,13 @@ public class MainModule extends AbstractModule {
return new MotionEventHandler(identityManager, deviceManager, tripsConfig);
}
+ @Singleton
+ @Provides
+ public static GeofenceEventHandler provideGeofenceEventHandler(
+ IdentityManager identityManager, GeofenceManager geofenceManager, CalendarManager calendarManager) {
+ return new GeofenceEventHandler(identityManager, geofenceManager, calendarManager);
+ }
+
@Override
protected void configure() {
binder().requireExplicitBindings();