Classes

The following classes are available globally.

  • This class is designed to act as an abstract base class, providing a simple Dictionary datastore that is stored in the UserDefaults in the Application Bundle. It is designed to be reliable, and extremely simple to use. The stored Dictionary would be a String-keyed Dictionary of Any (flexible types). It s up to subclasses to specialize the typeless data. THIS IS NOT EFFICIENT OR ROBUST! It is meant as a simple bucket for things like application preferences. It is not an industrial data storage solution. You have been warned. Subclasses could declare their accessors as KVO-style, thus, providing a direct way to influence persistent state. You can also directly observe the .values property. It will change when ANY pref is changed (so might not be suitable for pick and choose observation).

    See more

    Declaration

    Swift

    public class RVS_PersistentPrefs : NSObject
  • This class implements the main application delegate.

    It has a couple of class methods and calculated properties that you can use to get a context.

    See more

    Declaration

    Swift

    @NSApplicationMain
    class RVS_MediaServer_AppDelegate : NSObject, NSApplicationDelegate
  • The main reason for creating this class was to allow us to interpret settings, and to fix an issue with Interface Builder.

    See more

    Declaration

    Swift

    class RVS_MediaServer_WindowController : NSWindowController
  • 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.

    See more

    Declaration

    Swift

    public class RVS_MediaServer_PersistentPrefs : RVS_PersistentPrefs