package Ġcom . tech noc reat ives . be ck on . mesh . message Ċ Ċ import Ġarrow . core . Either Ċ import Ġarrow . core . comp ut ations . either Ċ import Ġcom . tech noc reat ives . be ck on . mesh . Send Ack Message Error Ċ import Ġcom . tech noc reat ives . be ck on . mesh . data .* Ċ import Ġcom . tech noc reat ives . be ck on . mesh . state . Connected Ċ import Ġkotlinx . serialization . Serial Name Ċ import Ġkotlinx . serialization . Serializable Ċ import Ġno . n ord ic semi . android . mesh . transport . Mesh Message Ċ import Ġno . n ord ic semi . android . mesh . transport . Proxy Config Add Address To Filter Ċ import Ġno . n ord ic semi . android . mesh . transport . Proxy Config Filter Status Ċ import Ġno . n ord ic semi . android . mesh . transport . Proxy Config Set Filter Type Ċ Ċ // ĠTODO Ġdefine Ġcustom Ġerror Ġhere Ċ suspend Ġfun ĠConnected . set Addresses To Proxy ( ĊĠĠĠ Ġfilter Type : ĠFilter Type , ĊĠĠĠ Ġaddresses : ĠList < Publish able Address > Ċ ): ĠEither < Send Ack Message Error , ĠUnit > Ġ= Ġeither Ġ{ ĊĊĠĠĠ Ġbe arer . send Config Message ( Set Proxy Filter Type ( filter Type )). bind () ĊĊĠĠĠ Ġif Ġ( addresses . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġbe arer . send Config Message ( Add Proxy Config Addresses ( addresses )). bind () ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ @ Serializable Ċ @ Serial Name (" Set Proxy Filter Type ") Ċ data Ġclass ĠSet Proxy Filter Type ( val Ġfilter Type : ĠFilter Type ) Ġ: ĊĠĠĠ ĠConfig Message < Proxy Config Filter Response >() Ġ{ ĊĠĠĠ Ġoverride Ġval Ġresponse OpCode Ġ= ĠStatus OpCode . Proxy Filter Type ĊĠĠĠ Ġoverride Ġval Ġdst : ĠInt Ġ= ĠUn assigned Address . value ĊĊĠĠĠ Ġoverride Ġfun Ġto Mesh Message () Ġ= ĠProxy Config Set Filter Type ( ĊĠĠĠĠĠĠĠ Ġfilter Type . transform () ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġoverride Ġfun Ġfrom Response ( message : ĠMesh Message ): ĠProxy Config Filter Response Ġ= ĊĠĠĠĠĠĠĠ Ġ( message Ġas ĠProxy Config Filter Status ). transform () Ċ } Ċ Ċ @ Serializable Ċ data Ġclass ĠProxy Config Filter Response ( ĊĠĠĠ Ġoverride Ġval Ġdst : ĠInt , ĊĠĠĠ Ġoverride Ġval Ġsrc : ĠInt , ĊĠĠĠ Ġval Ġfilter Type : ĠFilter Type , ĊĠĠĠ Ġval Ġlist Size : ĠInt , Ċ ) Ġ: ĠConfig StatusMessage () Ċ Ċ fun ĠProxy Config Filter Status . transform () Ġ= ĠProxy Config Filter Response ( ĊĠĠĠ Ġdst , ĊĠĠĠ Ġsrc , ĊĠĠĠ Ġfilter Type . transform (), ĊĠĠĠ Ġlist Size Ċ ) Ċ Ċ @ Serializable Ċ @ Serial Name (" Add Proxy Config Addresses ") Ċ data Ġclass ĠAdd Proxy Config Addresses ( val Ġaddresses : ĠList < Publish able Address >) Ġ: ĊĠĠĠ ĠConfig Message < Proxy Config Filter Response >() Ġ{ ĊĠĠĠ Ġoverride Ġval Ġresponse OpCode Ġ= ĠStatus OpCode . Proxy Filter Type ĊĠĠĠ Ġoverride Ġval Ġdst : ĠInt Ġ= ĠUn assigned Address . value ĊĠĠĠ Ġoverride Ġfun Ġto Mesh Message () Ġ= ĠProxy Config Add Address To Filter ( ĊĠĠĠĠĠĠĠ Ġaddresses . map Ġ{ Ġit . to Address Array () Ġ} ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġoverride Ġfun Ġfrom Response ( message : ĠMesh Message ): ĠProxy Config Filter Response Ġ= ĊĠĠĠĠĠĠĠ Ġ( message Ġas ĠProxy Config Filter Status ). transform () Ċ }