## OobsHostsConfig OobsHostsConfig — Object that represents hosts resolution configuration |

## Synopsis

                        OobsHostsConfig;
                        OobsHostsConfigClass;
    OobsObject*         oobs_hosts_config_get               (void);
    const gchar*        oobs_hosts_config_get_hostname      (OobsHostsConfig *config);
    void                oobs_hosts_config_set_hostname      (OobsHostsConfig *config,
                                                             const gchar *hostname);
    const gchar*        oobs_hosts_config_get_domainname    (OobsHostsConfig *config);
    void                oobs_hosts_config_set_domainname    (OobsHostsConfig *config,
                                                             const gchar *domainname);
    OobsList*           oobs_hosts_config_get_static_hosts  (OobsHostsConfig *config);
    GList*              oobs_hosts_config_get_dns_servers   (OobsHostsConfig *config);
    void                oobs_hosts_config_set_dns_servers   (OobsHostsConfig *config,
                                                             GList *dns_list);
    GList*              oobs_hosts_config_get_search_domains
                                                            (OobsHostsConfig *config);
    void                oobs_hosts_config_set_search_domains
                                                            (OobsHostsConfig *config,
                                                             GList *search_domains_list);

## Object Hierarchy

      GObject
       +----OobsObject
             +----OobsHostsConfig

## Description

## Details

### OobsHostsConfig

    typedef struct _OobsHostsConfig OobsHostsConfig;

### OobsHostsConfigClass

    typedef struct {
      OobsObjectClass parent_class;

      void (*_oobs_padding1) (void);
      void (*_oobs_padding2) (void);
      void (*_oobs_padding3) (void);
      void (*_oobs_padding4) (void);
    } OobsHostsConfigClass;

### oobs_hosts_config_get ()

    OobsObject*         oobs_hosts_config_get               (void);

Returns the OobsHostsConfig singleton, this object represents the hosts resolution configuration.

Returns : | the singleton OobsHostsConfig.

### oobs_hosts_config_get_hostname ()

    const gchar*        oobs_hosts_config_get_hostname      (OobsHostsConfig *config);

Returns the hostname for the machine.

`config` : | An OobsHostsConfig.
Returns : | A pointer to the hostname as a string. This string must not be freed, modified or stored.

### oobs_hosts_config_set_hostname ()

    void                oobs_hosts_config_set_hostname      (OobsHostsConfig *config,
                                                             const gchar *hostname);

Sets a new hostname, overwriting the previous one.

`config` : | An OobsHostsConfig.
`hostname` : | A new hostname.

### oobs_hosts_config_get_domainname ()

    const gchar*        oobs_hosts_config_get_domainname    (OobsHostsConfig *config);

Returns the domain name for the machine.

`config` : | An OobsHostsConfig.
Returns : | A pointer to the domain name as a string. This string must not be freed, modified or stored.

### oobs_hosts_config_set_domainname ()

    void                oobs_hosts_config_set_domainname    (OobsHostsConfig *config,
                                                             const gchar *domainname);

Sets a new domain name, overwriting the previous one.

`config` : | An OobsHostsConfig.
`domainname` : | A new domain name.

### oobs_hosts_config_get_static_hosts ()

    OobsList*           oobs_hosts_config_get_static_hosts  (OobsHostsConfig *config);

Returns an OobsList containing objects of type OobsStaticHost.

`config` : | An OobsHostsConfig.
Returns : | An OobsList containing the static hosts configuration.

### oobs_hosts_config_get_dns_servers ()

    GList*              oobs_hosts_config_get_dns_servers   (OobsHostsConfig *config);

Returns a GList containing the IP addresses of the DNS servers. The returned list must be freed with `g_list_free()`.

`config` : | An OobsHostsConfig.
Returns : | a GList of gchar pointers

### oobs_hosts_config_set_dns_servers ()

    void                oobs_hosts_config_set_dns_servers   (OobsHostsConfig *config,
                                                             GList *dns_list);

Overwrites the list of DNS servers. The previous list and its contents will be freed, so any merging will have to be done by hand.

`config` : | An OobsHostsConfig.
`dns_list` : | a GList containing strings with the IP addresses of the DNS servers.

### oobs_hosts_config_get_search_domains ()

    GList*              oobs_hosts_config_get_search_domains
                                                            (OobsHostsConfig *config);

Returns a GList containing the search domains. The returned list musts be freed with `g_list_free()`.

`config` : | An OobsHostsConfig.
Returns : | a GList of gchar pointers.

### oobs_hosts_config_set_search_domains ()

    void                oobs_hosts_config_set_search_domains
                                                            (OobsHostsConfig *config,
                                                             GList *search_domains_list);

Overwrites the list of search domains. The previous list and its contents will be freed, so any merging will have to be done by hand.

`config` : | An OobsHostsConfig
`search_domains_list` : | a GList containing strings with the search domains.

## See Also

OobsStaticHost