/* Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 1 7 , Ġ 2 0 1 8 , Ġ 2 0 1 9 ĠA det un ji ĠD ahun si . Ċ Ġ* Ċ Ġ* ĠĠĠĠ ĠThis Ġprogram Ġis Ġfree Ġsoftware : Ġyou Ġcan Ġredistribute Ġit Ġand / or Ġmodify Ċ Ġ* ĠĠĠĠ Ġit Ġunder Ġthe Ġterms Ġof Ġthe ĠGNU ĠGeneral ĠPublic ĠLicense Ġas Ġpublished Ġby Ċ Ġ* ĠĠĠĠ Ġthe ĠFree ĠSoftware ĠFoundation , Ġeither Ġversion Ġ 3 Ġof Ġthe ĠLicense , Ġor Ċ Ġ* ĠĠĠĠ Ġ( at Ġyour Ġoption ) Ġany Ġlater Ġversion . Ċ Ġ* Ċ Ġ* ĠĠĠĠ ĠThis Ġprogram Ġis Ġdistributed Ġin Ġthe Ġhope Ġthat Ġit Ġwill Ġbe Ġuseful , Ċ Ġ* ĠĠĠĠ Ġbut ĠWITHOUT ĠANY ĠWARRANTY ; Ġwithout Ġeven Ġthe Ġimplied Ġwarranty Ġof Ċ Ġ* ĠĠĠĠ ĠMERCHANTABILITY Ġor ĠFITNESS ĠFOR ĠA ĠPARTICULAR ĠPURPOSE . Ġ ĠSee Ġthe Ċ Ġ* ĠĠĠĠ ĠGNU ĠGeneral ĠPublic ĠLicense Ġfor Ġmore Ġdetails . Ċ Ġ* Ċ Ġ* ĠĠĠĠ ĠYou Ġshould Ġhave Ġreceived Ġa Ġcopy Ġof Ġthe ĠGNU ĠGeneral ĠPublic ĠLicense Ċ Ġ* ĠĠĠĠ Ġalong Ġwith Ġthis Ġprogram . Ġ ĠIf Ġnot , Ġsee Ġ< https :// www . gnu . org / licenses />. Ċ Ġ*/ Ċ Ċ package Ġcom . tun jid . rc switch control . di Ċ Ċ import Ġandroidx . activity . view Models Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . Fragment Activity Ċ import Ġandroidx . fragment . app . activity ViewModels Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . lifecycle . Lifecycle Service Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Lazy Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġandroidx . lifecycle . ViewModel Store Owner Ċ import Ġcom . tun jid . f inger gest ures . di . ViewModel Creators Ċ import Ġcom . tun jid . f inger gest ures . di . ViewModel Factory Ċ import Ġcom . tun jid . f inger gest ures . di . ViewModel Key Ċ import Ġcom . tun jid . rc switch control . client . Client ViewModel Ċ import Ġcom . tun jid . rc switch control . utils . Lifecycle ViewModel Store Provider Ċ import Ġcom . tun jid . rc switch control . server . Server ViewModel Ċ import Ġcom . tun jid . rc switch control . control . Control ViewModel Ċ import Ġcom . tun jid . rc switch control . server . Host ViewModel Ċ import Ġcom . tun jid . rc switch control . on boarding . N sd Scan ViewModel Ċ import Ġdagger . Bind s Ċ import Ġdagger . Module Ċ import Ġdagger . mult ib ind ings . Into Map Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ inline Ġfun Ġ< re ified ĠVM Ġ: ĠViewModel > ĠFragment . viewModel Factory ( ĊĠĠĠ Ġno inline Ġowner Producer : Ġ() Ġ-> ĠViewModel Store Owner Ġ= Ġ{ Ġthis Ġ} Ċ ) Ġ= Ġview Models < VM >( owner Producer Ġ= Ġowner Producer ) Ġ{ Ġdagger . viewModel Factory Ġ} Ċ Ċ inline Ġfun Ġ< re ified ĠVM Ġ: ĠViewModel > ĠFragment . activity ViewModel Factory () Ġ= ĊĠĠĠ Ġactivity ViewModels < VM > Ġ{ Ġdagger . viewModel Factory Ġ} Ċ Ċ inline Ġfun Ġ< re ified ĠVM Ġ: ĠViewModel > ĠFragment Activity . viewModel Factory () Ġ= ĊĠĠĠ Ġview Models < VM > Ġ{ Ġdagger . viewModel Factory Ġ} Ċ Ċ inline Ġfun Ġ< re ified ĠVM Ġ: ĠViewModel > ĠLifecycle Service . viewModel Factory () Ġ= ĊĠĠĠ ĠViewModel Lazy ( ĊĠĠĠĠĠĠĠ ĠviewModel Class Ġ= ĠVM :: class , ĊĠĠĠĠĠĠĠ Ġstore Producer Ġ= Ġ{ ĠLifecycle ViewModel Store Provider ( lifecycle ). viewModel Store Ġ}, ĊĠĠĠĠĠĠĠ Ġfactory Producer Ġ= Ġ{ Ġdagger . viewModel Factory Ġ} ĊĠĠĠ Ġ) Ċ Ċ val ĠD agger . viewModel Factory Ġget () Ġ= Ġapp Component . viewModel Factory () Ċ Ċ @ Singleton Ċ class ĠApp ViewModel Factory Ġ@ Inject Ġconstructor ( cre ators : ĠViewModel Creators ) Ġ: ĠViewModel Factory ( cre ators ) Ċ Ċ @ Module Ċ abstract Ġclass ĠApp ViewModel Module Ġ{ ĊĠĠĠ Ġ@ Bind s ĊĠĠĠ Ġabstract Ġfun Ġbind App ViewModel Factory ( factory : ĠApp ViewModel Factory ): ĠViewModel Provider . Factory ĊĊĠĠĠ Ġ@ Bind s Ġ@ Into Map Ġ@ ViewModel Key ( Control ViewModel :: class ) ĊĠĠĠ Ġabstract Ġfun Ġbind Control ViewModel ( viewModel : ĠControl ViewModel ): ĠViewModel ĊĊĠĠĠ Ġ@ Bind s Ġ@ Into Map Ġ@ ViewModel Key ( Host ViewModel :: class ) ĊĠĠĠ Ġabstract Ġfun Ġbind Person Host ViewModel ( viewModel : ĠHost ViewModel ): ĠViewModel ĊĊĠĠĠ Ġ@ Bind s Ġ@ Into Map Ġ@ ViewModel Key ( N sd Scan ViewModel :: class ) ĊĠĠĠ Ġabstract Ġfun Ġbind N sd Scan ViewModel ( viewModel : ĠN sd Scan ViewModel ): ĠViewModel ĊĊĠĠĠ Ġ@ Bind s Ġ@ Into Map Ġ@ ViewModel Key ( Server ViewModel :: class ) ĊĠĠĠ Ġabstract Ġfun Ġbind Server ViewModel ( viewModel : ĠServer ViewModel ): ĠViewModel ĊĊĠĠĠ Ġ@ Bind s Ġ@ Into Map Ġ@ ViewModel Key ( Client ViewModel :: class ) ĊĠĠĠ Ġabstract Ġfun Ġbind Client ViewModel ( viewModel : ĠClient ViewModel ): ĠViewModel Ċ }