BtSettings

BtSettings — base class for buzztard settings handling

Functions

Properties

gchar * audiosink Read / Write
guint channels Read / Write
gboolean coherence-upnp-active Read / Write
guint coherence-upnp-port Read / Write
gchar * grid-density Read / Write
gchar * missing-machines Read / Write
guint news-seen Read / Write
gchar * presented-tips Read / Write
gchar * record-folder Read / Write
gchar * sample-folder Read / Write
guint sample-rate Read / Write
gboolean show-tips Read / Write
gchar * song-folder Read / Write
gboolean statusbar-hide Read / Write
gchar * system-audiosink Read
gboolean tabs-hide Read / Write
gboolean toolbar-hide Read / Write
gchar * toolbar-style Read
gint window-height Read / Write
gint window-width Read / Write
gint window-xpos Read / Write
gint window-ypos Read / Write

Types and Values

struct BtSettings

Object Hierarchy

    GObject
    ╰── BtSettings
        ╰── BtGConfSettings

Includes

#include <libbtcore/core.h>

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. If the backends supports it changes in the settings will be notified to the application by the GObject::notify signal.

Functions

BtSettingsFactory ()

gpointer
(*BtSettingsFactory) (void);

Factory method that creates a new settings instance.

Returns

the setting implementation


bt_settings_determine_audiosink_name ()

gchar *
bt_settings_determine_audiosink_name (const BtSettings * const self);

Check the settings for the configured audio sink. Pick a fallback if none has been chosen. Verify that the sink works.

Parameters

self

the settings

 

Returns

the elemnt name, free when done.


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.

Parameters

factory

factory method

 

Types and Values

struct BtSettings

struct BtSettings;

base object for a buzztard based settings

Property Details

The “audiosink” property

  “audiosink”                gchar *

audio output gstreamer element.

Flags: Read / Write

Default value: "autoaudiosink"


The “channels” property

  “channels”                 guint

number of audio output channels.

Flags: Read / Write

Allowed values: [1,2]

Default value: 2


The “coherence-upnp-active” property

  “coherence-upnp-active”    gboolean

activate Coherence UPnP based playback controller.

Flags: Read / Write

Default value: FALSE


The “coherence-upnp-port” property

  “coherence-upnp-port”      guint

the port number for the communication with the coherence backend.

Flags: Read / Write

Default value: 7654


The “grid-density” property

  “grid-density”             gchar *

machine view grid detail level.

Flags: Read / Write

Default value: "low"


The “missing-machines” property

  “missing-machines”         gchar *

list of tip-numbers that were shown already.

Flags: Read / Write

Default value: NULL


The “news-seen” property

  “news-seen”                guint

version number for that the user has seen the news.

Flags: Read / Write

Default value: 0


The “presented-tips” property

  “presented-tips”           gchar *

list of missing machines to ignore.

Flags: Read / Write

Default value: NULL


The “record-folder” property

  “record-folder”            gchar *

default directory for recordings.

Flags: Read / Write

Default value: "/home/buildd"


The “sample-folder” property

  “sample-folder”            gchar *

default directory for sample-waveforms.

Flags: Read / Write

Default value: "/home/buildd"


The “sample-rate” property

  “sample-rate”              guint

audio output sample-rate.

Flags: Read / Write

Allowed values: [1,96000]

Default value: 44100


The “show-tips” property

  “show-tips”                gboolean

show tips on startup.

Flags: Read / Write

Default value: TRUE


The “song-folder” property

  “song-folder”              gchar *

default directory for songs.

Flags: Read / Write

Default value: "/home/buildd"


The “statusbar-hide” property

  “statusbar-hide”           gboolean

hide bottom statusbar.

Flags: Read / Write

Default value: FALSE


The “system-audiosink” property

  “system-audiosink”         gchar *

system audio output gstreamer element.

Flags: Read

Default value: "autoaudiosink"


The “tabs-hide” property

  “tabs-hide”                gboolean

hide main page tabs.

Flags: Read / Write

Default value: FALSE


The “toolbar-hide” property

  “toolbar-hide”             gboolean

hide main toolbar.

Flags: Read / Write

Default value: FALSE


The “toolbar-style” property

  “toolbar-style”            gchar *

system tolbar style.

Flags: Read

Default value: "both"


The “window-height” property

  “window-height”            gint

last application window height.

Flags: Read / Write

Allowed values: >= -1

Default value: -1


The “window-width” property

  “window-width”             gint

last application window width.

Flags: Read / Write

Allowed values: >= -1

Default value: -1


The “window-xpos” property

  “window-xpos”              gint

last application window x-position.

Flags: Read / Write

Default value: 0


The “window-ypos” property

  “window-ypos”              gint

last application window y-position.

Flags: Read / Write

Default value: 0