CallsSettings: Calls Reference Manual

## CallsSettings CallsSettings — The application settings |

## Functions

CallsSettings * | calls_settings_get_default ()
gboolean | calls_settings_get_use_default_origins ()
void | calls_settings_set_use_default_origins ()
char * | calls_settings_get_country_code ()
void | calls_settings_set_country_code ()
char ** | calls_settings_get_autoload_plugins ()
void | calls_settings_set_autoload_plugins ()
char ** | calls_settings_get_preferred_audio_codecs ()
void | calls_settings_set_preferred_audio_codecs ()
gboolean | calls_settings_get_always_allow_sdes ()
void | calls_settings_set_always_allow_sdes ()

## Properties

gboolean | always-allow-sdes | Read / Write
gboolean | auto-use-default-origins | Read / Write
GStrv | autoload-plugins | Read / Write
char * | country-code | Read / Write
GStrv | preferred-audio-codecs | Read / Write

## Types and Values

#define | CALLS_TYPE_SETTINGS
| CallsSettings

## Object Hierarchy

        GObject
        ╰── CallsSettings

## Description

Manage application settings

## Functions

### calls_settings_get_default ()

    CallsSettings *
    calls_settings_get_default (void);

#### Returns

A CallsSettings.

[transfer none]

### calls_settings_get_use_default_origins ()

    gboolean
    calls_settings_get_use_default_origins
                                   (CallsSettings *self);

Whether to prompt the user when there multiple origigins or fall back to defaults

#### Parameters

self | A CallsSettings |

#### Returns

`TRUE` if using defaults, `FALSE` when the user should be prompted

### calls_settings_set_use_default_origins ()

    void
    calls_settings_set_use_default_origins
                                   (CallsSettings *self,
                                    gboolean enable);

Sets whether to prompt the user when there multiple origigins or fall back to defaults

#### Parameters

self | A CallsSettings |
enable | `TRUE` to use default origins, `FALSE` otherwise |

### calls_settings_get_country_code ()

    char *
    calls_settings_get_country_code (CallsSettings *self);

Whether to prompt the user when there multiple origigins or fall back to defaults

#### Parameters

self | A CallsSettings |

#### Returns

The used country code.

[transfer full]

### calls_settings_set_country_code ()

    void
    calls_settings_set_country_code (CallsSettings *self,
                                     const char *country_code);

Sets the country code

#### Parameters

self | A CallsSettings |
country_code | The country code to set |

### calls_settings_get_autoload_plugins ()

    char **
    calls_settings_get_autoload_plugins (CallsSettings *self);

#### Parameters

self | A CallsSettings |

#### Returns

List of plugins that are automatically loaded on startup. Free with `g_strfreev()` when done.

[array zero-terminated=1][transfer full]

### calls_settings_set_autoload_plugins ()

    void
    calls_settings_set_autoload_plugins (CallsSettings *self,
                                         const char * const *plugins);

Sets the plugins that should be loaded on startup.

#### Parameters

self | A CallsSettings |
plugins | The plugins to autoload. | [array zero-terminated=1]

### calls_settings_get_preferred_audio_codecs ()

    char **
    calls_settings_get_preferred_audio_codecs
                                   (CallsSettings *self);

#### Parameters

self | A CallsSettings |

#### Returns

List of preferred audio codecs for VoIP calls. Free with `g_strfreev()` when done.

[transfer full]

### calls_settings_set_preferred_audio_codecs ()

    void
    calls_settings_set_preferred_audio_codecs
                                   (CallsSettings *self,
                                    const char * const *codecs);

Set the preferred audio codecs for VoIP calls.

#### Parameters

self | A CallsSettings |
codecs | The preferred codecs. | [array zero-terminated=1]

### calls_settings_get_always_allow_sdes ()

    gboolean
    calls_settings_get_always_allow_sdes (CallsSettings *self);

### calls_settings_set_always_allow_sdes ()

    void
    calls_settings_set_always_allow_sdes (CallsSettings *self,
                                          gboolean enabled);

## Types and Values

### CALLS_TYPE_SETTINGS

    #define CALLS_TYPE_SETTINGS (calls_settings_get_type ())

### CallsSettings

    typedef struct _CallsSettings CallsSettings;

## Property Details

### The `“always-allow-sdes”` property

      “always-allow-sdes”        gboolean

Whether to always allow using key exchange (without TLS).

Owner: CallsSettings

Flags: Read / Write

Default value: FALSE

### The `“auto-use-default-origins”` property

      “auto-use-default-origins” gboolean

Automatically use default origins.

Owner: CallsSettings

Flags: Read / Write

Default value: TRUE

### The `“autoload-plugins”` property

      “autoload-plugins”         GStrv

The plugins to automatically load on startup.

Owner: CallsSettings

Flags: Read / Write

### The `“country-code”` property

      “country-code”             char *

The country code (usually from the modem).

Owner: CallsSettings

Flags: Read / Write

Default value: ""

### The `“preferred-audio-codecs”` property

      “preferred-audio-codecs”   GStrv

The audio codecs to prefer for VoIP calls.

Owner: CallsSettings

Flags: Read / Write