## nm-settings-interface nm-settings-interface |

## Synopsis

    enum                NMSettingsInterfaceError;
    #define             NM_SETTINGS_INTERFACE_ERROR
    GQuark              nm_settings_interface_error_quark   (void);
    #define             NM_TYPE_SETTINGS_INTERFACE_ERROR
    #define             NM_SETTINGS_INTERFACE_GET_INTERFACE (obj)
    #define             NM_SETTINGS_INTERFACE_NEW_CONNECTION
    #define             NM_SETTINGS_INTERFACE_CONNECTIONS_READ
                        NMSettingsInterface;
    void                (*NMSettingsAddConnectionFunc)      (NMSettingsInterface *settings,
                                                             GError *error,
                                                             gpointer user_data);
    GType               nm_settings_interface_get_type      (void);
    GSList *            nm_settings_interface_list_connections
                                                            (NMSettingsInterface *settings);
    NMSettingsConnectionInterface * nm_settings_interface_get_connection_by_path
                                                            (NMSettingsInterface *settings,
                                                             const char *path);
    gboolean            nm_settings_interface_add_connection
                                                            (NMSettingsInterface *settings,
                                                             NMConnection *connection,
                                                             NMSettingsAddConnectionFunc callback,
                                                             gpointer user_data);

## Description

## Details

### enum NMSettingsInterfaceError

    typedef enum {
    	NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION = 0,
    	NM_SETTINGS_INTERFACE_ERROR_READ_ONLY_CONNECTION,
    	NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
    	NM_SETTINGS_INTERFACE_ERROR_SECRETS_UNAVAILABLE,
    	NM_SETTINGS_INTERFACE_ERROR_SECRETS_REQUEST_CANCELED,
    	NM_SETTINGS_INTERFACE_ERROR_PERMISSION_DENIED
    } NMSettingsInterfaceError;

### NM_SETTINGS_INTERFACE_ERROR

    #define NM_SETTINGS_INTERFACE_ERROR (nm_settings_interface_error_quark ())

### nm_settings_interface_error_quark ()

    GQuark              nm_settings_interface_error_quark   (void);

Setting error quark.

Returns : | the setting error quark

### NM_TYPE_SETTINGS_INTERFACE_ERROR

    #define NM_TYPE_SETTINGS_INTERFACE_ERROR (nm_settings_interface_error_get_type ())

### NM_SETTINGS_INTERFACE_GET_INTERFACE()

    #define NM_SETTINGS_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_SETTINGS_INTERFACE, NMSettingsInterface))

`obj` : |

### NM_SETTINGS_INTERFACE_NEW_CONNECTION

    #define NM_SETTINGS_INTERFACE_NEW_CONNECTION   "new-connection"

### NM_SETTINGS_INTERFACE_CONNECTIONS_READ

    #define NM_SETTINGS_INTERFACE_CONNECTIONS_READ "connections-read"

### NMSettingsInterface

    typedef struct {
    	GTypeInterface g_iface;

    	/* Methods */
    	/* Returns a list of objects implementing NMSettingsConnectionInterface */
    	GSList * (*list_connections) (NMSettingsInterface *settings);

    	NMSettingsConnectionInterface * (*get_connection_by_path) (NMSettingsInterface *settings,
    	                                                           const char *path);

    	gboolean (*add_connection) (NMSettingsInterface *settings,
    	                            NMConnection *connection,
    	                            NMSettingsAddConnectionFunc callback,
    	                            gpointer user_data);

    	/* Signals */
    	void (*new_connection) (NMSettingsInterface *settings,
    	                        NMSettingsConnectionInterface *connection);

    	void (*connections_read) (NMSettingsInterface *settings);

    	/* Padding for future expansion */
    	void (*_reserved1) (void);
    	void (*_reserved2) (void);
    	void (*_reserved3) (void);
    	void (*_reserved4) (void);
    	void (*_reserved5) (void);
    	void (*_reserved6) (void);
    } NMSettingsInterface;

### NMSettingsAddConnectionFunc ()

    void                (*NMSettingsAddConnectionFunc)      (NMSettingsInterface *settings,
                                                             GError *error,
                                                             gpointer user_data);

`settings` : |
`error` : |
`user_data` : |

### nm_settings_interface_get_type ()

    GType               nm_settings_interface_get_type      (void);

Returns : |

### nm_settings_interface_list_connections ()

    GSList *            nm_settings_interface_list_connections
                                                            (NMSettingsInterface *settings);

`settings` : |
Returns : |

### nm_settings_interface_get_connection_by_path ()

    NMSettingsConnectionInterface * nm_settings_interface_get_connection_by_path
                                                            (NMSettingsInterface *settings,
                                                             const char *path);

`settings` : |
`path` : |
Returns : |

### nm_settings_interface_add_connection ()

    gboolean            nm_settings_interface_add_connection
                                                            (NMSettingsInterface *settings,
                                                             NMConnection *connection,
                                                             NMSettingsAddConnectionFunc callback,
                                                             gpointer user_data);

Requests that the settings service add the given settings to a new connection.

`settings` : | a object implementing `NMSettingsInterface`
`connection` : | the settings to add; note that this object's settings will be added, not the object itself
`callback` : | callback to be called when the add operation completes
`user_data` : | caller-specific data passed to `callback`
Returns : | TRUE if the request was successful, FALSE if it failed