## BtSettings

BtSettings — base class for buzztard settings handling

## Synopsis

    #include <libbtcore/core.h>

                        BtSettings;
    gpointer            (*BtSettingsFactory)                (void);
    BtSettings *        bt_settings_make                    (void);
    void                bt_settings_set_factory             (BtSettingsFactory factory);

## Object Hierarchy

      GObject
       +----BtSettings
             +----BtGConfSettings
             +----BtPlainfileSettings

## Properties

      "audiosink"                gchar*                : Read / Write
      "channels"                 guint                 : Read / Write
      "coherence-upnp-active"    gboolean              : Read / Write
      "coherence-upnp-port"      guint                 : Read / Write
      "grid-density"             gchar*                : Read / Write
      "missing-machines"         gchar*                : Read / Write
      "news-seen"                guint                 : Read / Write
      "record-folder"            gchar*                : Read / Write
      "sample-folder"            gchar*                : Read / Write
      "sample-rate"              guint                 : Read / Write
      "song-folder"              gchar*                : Read / Write
      "statusbar-hide"           gboolean              : Read / Write
      "system-audiosink"         gchar*                : Read
      "tabs-hide"                gboolean              : Read / Write
      "toolbar-hide"             gboolean              : Read / Write
      "toolbar-style"            gchar*                : Read

## Description

Under the gnome platform GConf is a locical choice for settings managment. Unfortunately there currently is no port of GConf for other platforms. This class wraps the settings management. Depending on what settings managment capabillities the `configure` script find on the system one of the subclasses (BtGConfSettings,BtPlainfileSettings) will be used.

In any case it is always sufficient to talk to this class instance. Single settings are accessed via normat `g_object_get()` and `g_object_set()` calls.

## Details

### BtSettings

    typedef struct _BtSettings BtSettings;

base object for a buzztard based settings

### BtSettingsFactory ()

    gpointer            (*BtSettingsFactory)                (void);

Factory method that creates a new settings instance.

Returns : | the setting implementation

### bt_settings_make ()

    BtSettings *        bt_settings_make                    (void);

Create a new instance. The type of the settings depends on the subsystem found during configuration run.

Settings are implemented as a singleton. Thus the first invocation will create the object and further calls will just give back a reference.

Returns : | the instance or `NULL` in case of an error

### bt_settings_set_factory ()

    void                bt_settings_set_factory             (BtSettingsFactory factory);

Set a factory method that creates a new settings instance. This is currently only used by the unit tests to exercise the applications under various conditions. Normal applications should NOT use it.

`factory` : | factory method

## Property Details

### The `"audiosink"` property

      "audiosink"                gchar*                : Read / Write

audio output gstreamer element.

Default value: "autoaudiosink"

### The `"channels"` property

      "channels"                 guint                 : Read / Write

number of audio output channels.

Allowed values: [1,2]

Default value: 2

### The `"coherence-upnp-active"` property

      "coherence-upnp-active"    gboolean              : Read / Write

activate Coherence UPnP based playback controller.

Default value: FALSE

### The `"coherence-upnp-port"` property

      "coherence-upnp-port"      guint                 : Read / Write

the port number for the communication with the coherence backend.

Default value: 7654

### The `"grid-density"` property

      "grid-density"             gchar*                : Read / Write

machine view grid detail level.

Default value: "low"

### The `"missing-machines"` property

      "missing-machines"         gchar*                : Read / Write

list of missing machines to ignore.

Default value: NULL

### The `"news-seen"` property

      "news-seen"                guint                 : Read / Write

version number for that the user has seen the news.

Default value: 0

### The `"record-folder"` property

      "record-folder"            gchar*                : Read / Write

default directory for recordings.

Default value: "/home/ensonic"

### The `"sample-folder"` property

      "sample-folder"            gchar*                : Read / Write

default directory for sample-waveforms.

Default value: "/home/ensonic"

### The `"sample-rate"` property

      "sample-rate"              guint                 : Read / Write

audio output sample-rate.

Allowed values: [1,96000]

Default value: 44100

### The `"song-folder"` property

      "song-folder"              gchar*                : Read / Write

default directory for songs.

Default value: "/home/ensonic"

### The `"statusbar-hide"` property

      "statusbar-hide"           gboolean              : Read / Write

hide bottom statusbar.

Default value: FALSE

### The `"system-audiosink"` property

      "system-audiosink"         gchar*                : Read

system audio output gstreamer element.

Default value: "autoaudiosink"

### The `"tabs-hide"` property

      "tabs-hide"                gboolean              : Read / Write

hide main page tabs.

Default value: FALSE

### The `"toolbar-hide"` property

      "toolbar-hide"             gboolean              : Read / Write

hide main toolbar.

Default value: FALSE

### The `"toolbar-style"` property

      "toolbar-style"            gchar*                : Read

system tolbar style.

Default value: "both"