package Ġio . homeassistant . comp anion . android . common . data Ċ Ċ import Ġandroid . annotation . Suppress Lint Ċ import Ġandroid . content . Context Ċ import Ġandroid . net . wifi . Wifi Manager Ċ import Ġandroid . os . Build Ċ import Ġandroid . provider . Settings Ċ import Ġandroidx . core . content . getSystem Service Ċ import Ġdagger . Bind s Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġio . homeassistant . comp anion . android . common . LocalStorage Impl Ċ import Ġio . homeassistant . comp anion . android . common . data . authentication . Authentication Repository Ċ import Ġio . homeassistant . comp anion . android . common . data . authentication . impl . Authentication Repository Impl Ċ import Ġio . homeassistant . comp anion . android . common . data . authentication . impl . Authentication Service Ċ import Ġio . homeassistant . comp anion . android . common . data . integration . Integration Repository Ċ import Ġio . homeassistant . comp anion . android . common . data . integration . impl . Integration Repository Impl Ċ import Ġio . homeassistant . comp anion . android . common . data . integration . impl . Integration Service Ċ import Ġio . homeassistant . comp anion . android . common . data . prefs . Prefs Repository Ċ import Ġio . homeassistant . comp anion . android . common . data . prefs . Prefs Repository Impl Ċ import Ġio . homeassistant . comp anion . android . common . data . url . Url Repository Ċ import Ġio . homeassistant . comp anion . android . common . data . url . Url Repository Impl Ċ import Ġio . homeassistant . comp anion . android . common . data . websocket . WebSocket Repository Ċ import Ġio . homeassistant . comp anion . android . common . data . websocket . impl . WebSocket Repository Impl Ċ import Ġio . homeassistant . comp anion . android . common . data . wifi . Wifi Helper Ċ import Ġio . homeassistant . comp anion . android . common . data . wifi . Wifi Helper Impl Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġjavax . inject . Named Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ abstract Ġclass ĠData Module Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Authentication Service ( home Assistant Apis : ĠHome Assistant Apis ): ĠAuthentication Service Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhome Assistant Apis . ret rofit . create ( Authentication Service :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovides Integration Service ( home Assistant Apis : ĠHome Assistant Apis ): ĠIntegration Service Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhome Assistant Apis . ret rofit . create ( Integration Service :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovides Ok HttpClient ( home Assistant Apis : ĠHome Assistant Apis ): ĠOk HttpClient Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhome Assistant Apis . ok HttpClient ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" url ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Url LocalStorage (@ ApplicationContext Ġapp Context : ĠContext ): ĠLocal Storage Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLocal Storage Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapp Context . get SharedPreferences ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" url _ 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠContext . MODE _ PRIVATE ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" session ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Session LocalStorage (@ ApplicationContext Ġapp Context : ĠContext ): ĠLocal Storage Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLocal Storage Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapp Context . get SharedPreferences ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" session _ 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠContext . MODE _ PRIVATE ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" integration ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Integration LocalStorage (@ ApplicationContext Ġapp Context : ĠContext ): ĠLocal Storage Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLocal Storage Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapp Context . get SharedPreferences ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" integration _ 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠContext . MODE _ PRIVATE ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" themes ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Prefs LocalStorage (@ ApplicationContext Ġapp Context : ĠContext ): ĠLocal Storage Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLocal Storage Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapp Context . get SharedPreferences ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" themes _ 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠContext . MODE _ PRIVATE ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" manufacturer ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Device Manufacturer (): ĠString Ġ= ĠBuild . MAN U FACT UR ER ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" model ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Device Model (): ĠString Ġ= ĠBuild . MODEL ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" os Version ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide Device Os Version () Ġ= ĠBuild . VERSION . SDK _ INT . toString () ĊĊĠĠĠĠĠĠĠ Ġ@ Suppress Lint (" Hardware Ids ") ĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Named (" deviceId ") ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġprovide DeviceId (@ ApplicationContext Ġapp Context : ĠContext ) Ġ= ĠSettings . Secure . getString ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġapp Context . content Resolver , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSettings . Secure . ANDROID _ ID ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġ@ Provides ĊĠĠĠĠĠĠĠ Ġ@ Singleton ĊĠĠĠĠĠĠĠ Ġfun Ġwifi Manager (@ ApplicationContext Ġapp Context : ĠContext ) Ġ= Ġapp Context . getSystem Service < Wifi Manager >() !! ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġabstract Ġfun Ġbind Auth Repository ( authentication Repository : ĠAuthentication Repository Impl ): ĠAuthentication Repository ĊĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġabstract Ġfun Ġbind Integration Repository ( integration Repository : ĠIntegration Repository Impl ): ĠIntegration Repository ĊĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġabstract Ġfun Ġbind Prefs Repository ( prefs Repository : ĠP refs Repository Impl ): ĠP refs Repository ĊĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġabstract Ġfun Ġbind Url Repository ( url Repository : ĠUrl Repository Impl ): ĠUrl Repository ĊĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġabstract Ġfun Ġbind WebSocket Repository ( web Socket Repository : ĠWebSocket Repository Impl ): ĠWebSocket Repository ĊĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġabstract Ġfun Ġbind Wifi Repository ( wifi Helper : ĠW ifi Helper Impl ): ĠW ifi Helper Ċ } Ċ