package Ġcom . al v ay on ara . out sched . core . data . source . local Ċ Ċ import Ġcom . al v ay on ara . out sched . core . data . source . local . entity . Schedule Entity Ċ import Ġcom . al v ay on ara . out sched . core . data . source . local . room . Schedule Dao Ċ import Ġio . reactivex . Flow able Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Singleton Ċ class ĠLocal DataSource Ġ@ Inject Ġconstructor ( private Ġval Ġm Schedule Dao : ĠSchedule Dao ) Ġ{ ĊĊĠĠĠ Ġfun ĠgetAll Up coming Schedules (): ĠFlow able < List < Schedule Entity >> Ġ= ĊĠĠĠĠĠĠĠ Ġm Schedule Dao . getAll Up coming Schedules () ĊĊĠĠĠ Ġfun ĠgetAll Past Schedules (): ĠFlow able < List < Schedule Entity >> Ġ= Ġm Schedule Dao . getAll Past Schedules () ĊĊĠĠĠ Ġfun Ġinsert Schedule ( schedule Entity : ĠSchedule Entity ) Ġ= Ġm Schedule Dao . insert Schedule ( schedule Entity ) ĊĊĠĠĠ Ġfun Ġdelete Schedule ( schedule Entity : ĠSchedule Entity ) Ġ= Ġm Schedule Dao . delete Schedule ( schedule Entity ) ĊĊĠĠĠ Ġfun Ġcheck Schedule ( time : ĠLong , Ġlatitude : ĠString , Ġlongitude : ĠString ): ĠFlow able < Int > Ġ= ĊĠĠĠĠĠĠĠ Ġm Schedule Dao . check Schedules ( time , Ġlatitude , Ġlongitude ) Ċ }