Search in sources :

Example 1 with PreferenceManager

use of org.jivesoftware.spark.preference.PreferenceManager in project Spark by igniterealtime.

the class SoftPhoneManager method loadLocalPreferences.

private void loadLocalPreferences() {
    preference = new SipPreference();
    PreferenceManager pm = SparkManager.getPreferenceManager();
    pm.addPreference(preference);
    preferences = (SipPreferences) preference.getData();
    SIPConfig.setUseStun(preferences.isUseStun());
    SIPConfig.setStunServer(preferences.getStunServer());
    SIPConfig.setStunPort(preferences.getStunPort());
    SIPConfig.setPreferredNetworkAddress(preferences.getPreferredAddress());
    preference.setCommitSettings(true);
    if (preferences.isRegisterAtStart()) {
        register();
    }
}
Also used : SipPreference(org.jivesoftware.sparkplugin.preferences.SipPreference) PreferenceManager(org.jivesoftware.spark.preference.PreferenceManager)

Aggregations

PreferenceManager (org.jivesoftware.spark.preference.PreferenceManager)1 SipPreference (org.jivesoftware.sparkplugin.preferences.SipPreference)1