NMSettingConnection

## NMSettingConnection NMSettingConnection — Describes general connection properties |

## Synopsis

    #include <nm-setting-connection.h>

    #define             NM_SETTING_CONNECTION_SETTING_NAME
    enum                NMSettingConnectionError;
    #define             NM_TYPE_SETTING_CONNECTION_ERROR
    #define             NM_SETTING_CONNECTION_ERROR
    GQuark              nm_setting_connection_error_quark   (void);
    #define             NM_SETTING_CONNECTION_ID
    #define             NM_SETTING_CONNECTION_UUID
    #define             NM_SETTING_CONNECTION_TYPE
    #define             NM_SETTING_CONNECTION_AUTOCONNECT
    #define             NM_SETTING_CONNECTION_TIMESTAMP
    #define             NM_SETTING_CONNECTION_READ_ONLY
                        NMSettingConnection;
    GType               nm_setting_connection_get_type      (void);
    NMSetting*          nm_setting_connection_new           (void);
    const char*         nm_setting_connection_get_id        (NMSettingConnection *setting);
    const char*         nm_setting_connection_get_uuid      (NMSettingConnection *setting);
    const char*         nm_setting_connection_get_connection_type
                                                            (NMSettingConnection *setting);
    gboolean            nm_setting_connection_get_autoconnect
                                                            (NMSettingConnection *setting);
    guint64             nm_setting_connection_get_timestamp (NMSettingConnection *setting);
    gboolean            nm_setting_connection_get_read_only (NMSettingConnection *setting);

## Object Hierarchy

      GObject
       +----NMSetting
             +----NMSettingConnection

## Properties

      "autoconnect"              gboolean              : Read / Write
      "id"                       gchararray            : Read / Write
      "read-only"                gboolean              : Read / Write
      "timestamp"                guint64               : Read / Write
      "type"                     gchararray            : Read / Write
      "uuid"                     gchararray            : Read / Write

## Description

The NMSettingConnection object is a NMSetting subclass that describes properties that apply to all NMConnection objects, regardless of what type of network connection they describe. Each NMConnection object must contain a NMSettingConnection setting.

## Details

### NM_SETTING_CONNECTION_SETTING_NAME

    #define NM_SETTING_CONNECTION_SETTING_NAME "connection"

### enum NMSettingConnectionError

    typedef enum
    {
    	NM_SETTING_CONNECTION_ERROR_UNKNOWN = 0,
    	NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY,
    	NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
    	NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND
    } NMSettingConnectionError;

Describes errors that may result from operations involving a NMSettingConnection.

`NM_SETTING_CONNECTION_ERROR_UNKNOWN` | unknown or unclassified error
`NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY` | the property's value is invalid
`NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY` | a required property is not present
`NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND` | the NMSetting object referenced by the setting name contained in the "type" property was not present in the NMConnection

### NM_TYPE_SETTING_CONNECTION_ERROR

    #define NM_TYPE_SETTING_CONNECTION_ERROR (nm_setting_connection_error_get_type ())

### NM_SETTING_CONNECTION_ERROR

    #define NM_SETTING_CONNECTION_ERROR nm_setting_connection_error_quark ()

### nm_setting_connection_error_quark ()

    GQuark              nm_setting_connection_error_quark   (void);

Registers an error quark for NMSettingConnection if necessary.

Returns : | the error quark used for NMSettingConnection errors.

### NM_SETTING_CONNECTION_ID

    #define NM_SETTING_CONNECTION_ID          "id"

### NM_SETTING_CONNECTION_UUID

    #define NM_SETTING_CONNECTION_UUID        "uuid"

### NM_SETTING_CONNECTION_TYPE

    #define NM_SETTING_CONNECTION_TYPE        "type"

### NM_SETTING_CONNECTION_AUTOCONNECT

    #define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"

### NM_SETTING_CONNECTION_TIMESTAMP

    #define NM_SETTING_CONNECTION_TIMESTAMP   "timestamp"

### NM_SETTING_CONNECTION_READ_ONLY

    #define NM_SETTING_CONNECTION_READ_ONLY   "read-only"

### NMSettingConnection

    typedef struct _NMSettingConnection NMSettingConnection;

The NMSettingConnection struct contains only private data. It should only be accessed through the functions described below.

### nm_setting_connection_get_type ()

    GType               nm_setting_connection_get_type      (void);

Returns the "type" property of the connection.

Returns : | the connection type

### nm_setting_connection_new ()

    NMSetting*          nm_setting_connection_new           (void);

Creates a new NMSettingConnection object with default values.

Returns : | the new empty NMSettingConnection object

### nm_setting_connection_get_id ()

    const char*         nm_setting_connection_get_id        (NMSettingConnection *setting);

Returns the "id" property of the connection.

`setting` : | the NMSettingConnection
Returns : | the connection ID

### nm_setting_connection_get_uuid ()

    const char*         nm_setting_connection_get_uuid      (NMSettingConnection *setting);

Returns the "uuid" property of the connection.

`setting` : | the NMSettingConnection
Returns : | the connection UUID

### nm_setting_connection_get_connection_type ()

    const char*         nm_setting_connection_get_connection_type
                                                            (NMSettingConnection *setting);

`setting` : |
Returns : |

### nm_setting_connection_get_autoconnect ()

    gboolean            nm_setting_connection_get_autoconnect
                                                            (NMSettingConnection *setting);

Returns the "autoconnect" property of the connection.

`setting` : | the NMSettingConnection
Returns : | the connection's autoconnect behavior

### nm_setting_connection_get_timestamp ()

    guint64             nm_setting_connection_get_timestamp (NMSettingConnection *setting);

Returns the "timestamp" property of the connection.

`setting` : | the NMSettingConnection
Returns : | the connection's timestamp

### nm_setting_connection_get_read_only ()

    gboolean            nm_setting_connection_get_read_only (NMSettingConnection *setting);

Returns the "read-only" property of the connection.

`setting` : | the NMSettingConnection
Returns : | `TRUE` if the connection is read-only, `FALSE` if it is not

## Property Details

### The `"autoconnect"` property

      "autoconnect"              gboolean              : Read / Write

Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. `TRUE` to automatically activate the connection, `FALSE` to require manual intervention to activate the connection.

Default value: FALSE

### The `"id"` property

      "id"                       gchararray            : Read / Write

A human readable unique idenfier for the connection, like "Work WiFi" or "T-Mobile 3G".

Default value: NULL

### The `"read-only"` property

      "read-only"                gboolean              : Read / Write

`TRUE` if the connection can be modified using the providing settings service's D-Bus interface with the right privileges, or `FALSE` if the connection is read-only and cannot be modified.

Default value: FALSE

### The `"timestamp"` property

      "timestamp"                guint64               : Read / Write

The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated.

Default value: 0

### The `"type"` property

      "type"                     gchararray            : Read / Write

The general hardware type of the device used for the network connection, contains the name of the NMSetting object that describes that hardware type's parameters. For example, for WiFi devices, the name of the NMSettingWireless setting.

Default value: NULL

### The `"uuid"` property

      "uuid"                     gchararray            : Read / Write

A universally unique idenfier for the connection, for example generated with libuuid. Should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, should not be changed when the "id" or NMSettingIP4Config changes, but might need to be re-created when the WiFi SSID, mobile broadband network provider, or "type" changes.

Default value: NULL