RVS_MediaServer_PersistentPrefs

public class RVS_MediaServer_PersistentPrefs : RVS_PersistentPrefs

This class translates from the rather generic prefs we have in persistent storage, to an object model. It also provides a KVO wrapper for them. This will also explicitly reference the main prefs object, so simply instantiating this class will automagically give you the app prefs. All changes will be sent to the bundle prefs. We use a class, even though we could get away with a struct, because we want to make it clear that we are affecting referenced values (saved in the bundle). As the class is KVO-enabled, you can bind it for stuff like SwiftUI. As it is a class, it can be subclassed and extended.

  • These are the keys for our prefs. Making it CaseIterable means that we can access the cases and return them as strings.

    See more

    Declaration

    Swift

    private enum _PrefsKeys : String, CaseIterable
  • These are the default prefs values.

    Declaration

    Swift

    private static let _defaultPrefsValues: [String : Any]
  • This clears the prefs to default. This does not clear the webserver property.

    Declaration

    Swift

    func reset()
  • Init with a key for this instance.

    Declaration

    Swift

    init(key inKey: String)

    Parameters

    key

    The key (as a String) for this instance.

  • It is an Array of String, containing the keys used to store and retrieve the values from persistent storage.

    Declaration

    Swift

    override public var keys: [String] { get }
  • The Stream Title, as a String.

    Declaration

    Swift

    @objc
    dynamic var stream_name: String { get set }
  • The input URI, as a String.

    Declaration

    Swift

    @objc
    dynamic var input_uri: String { get set }
  • The output TCP port, as an Int.

    Declaration

    Swift

    @objc
    dynamic var output_tcp_port: Int { get set }
  • The Login ID, as a String.

    Declaration

    Swift

    @objc
    dynamic var login_id: String { get set }
  • The Password, as a String.

    Declaration

    Swift

    @objc
    dynamic var password: String { get set }
  • The Temp Directory Name, as a String.

    Declaration

    Swift

    @objc
    dynamic var temp_directory_name: String { get set }
  • Returns true, if we are using a raw parameter list.

    Declaration

    Swift

    @objc
    dynamic var use_raw_parameters: Bool { get set }
  • The parameter list (only used if use_raw_parameters is true).

    Declaration

    Swift

    @objc
    dynamic var rawFFMPEGString: String { get set }
  • Returns true, if we are using a built-in HTTP server.

    Declaration

    Swift

    @objc
    dynamic var use_output_http_server: Bool { get set }
  • Returns true, if the prefs window is open.

    Declaration

    Swift

    @objc
    dynamic var prefs_window_open: Bool { get set }
  • Returns true, if the console screen is open.

    Declaration

    Swift

    @objc
    dynamic var display_console_screen: Bool { get set }