Skip to content

topl-service-base / io.matthewnelson.topl_service_base / BaseServiceTorSettings / <init>

<init>

BaseServiceTorSettings(servicePrefs:TorServicePrefs, defaultTorSettings:ApplicationDefaultTorSettings)

This class enables the querying of TorServicePrefs to obtain values potentially set by the User such that they are preferred over static/default values you may have set in your ApplicationDefaultTorSettings.

It enables the updating of settings in a standardized manner so library users can simply instantiate TorServicePrefs, modify settings, and then call restartTor from the topl-service::TorServiceController to have them applied to the Tor Process. It also makes designing of a settings screen much easier for your application.

Parameters

servicePrefs - TorServicePrefs to query/save values to shared preferences

defaultTorSettings - Default values to fall back on if nothing is returned from TorServicePrefs