nm-settings-connection-interface

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

## Synopsis

    #define             NM_SETTINGS_CONNECTION_INTERFACE_GET_INTERFACE(obj)
    #define             NM_SETTINGS_CONNECTION_INTERFACE_UPDATED
    #define             NM_SETTINGS_CONNECTION_INTERFACE_REMOVED
                        NMSettingsConnectionInterface;
    void                (*NMSettingsConnectionInterfaceUpdateFunc)
                                                            (NMSettingsConnectionInterface *connection,
                                                             GError *error,
                                                             gpointer user_data);
    void                (*NMSettingsConnectionInterfaceDeleteFunc)
                                                            (NMSettingsConnectionInterface *connection,
                                                             GError *error,
                                                             gpointer user_data);
    void                (*NMSettingsConnectionInterfaceGetSecretsFunc)
                                                            (NMSettingsConnectionInterface *connection,
                                                             GHashTable *secrets,
                                                             GError *error,
                                                             gpointer user_data);
    gboolean            nm_settings_connection_interface_update
                                                            (NMSettingsConnectionInterface *connection,
                                                             NMSettingsConnectionInterfaceUpdateFunc callback,
                                                             gpointer user_data);
    gboolean            nm_settings_connection_interface_delete
                                                            (NMSettingsConnectionInterface *connection,
                                                             NMSettingsConnectionInterfaceDeleteFunc callback,
                                                             gpointer user_data);
    gboolean            nm_settings_connection_interface_get_secrets
                                                            (NMSettingsConnectionInterface *connection,
                                                             const char *setting_name,
                                                             const char **hints,
                                                             gboolean request_new,
                                                             NMSettingsConnectionInterfaceGetSecretsFunc callback,
                                                             gpointer user_data);
    void                nm_settings_connection_interface_emit_updated
                                                            (NMSettingsConnectionInterface *connection);

## Description

## Details

### NM_SETTINGS_CONNECTION_INTERFACE_GET_INTERFACE()

    #define NM_SETTINGS_CONNECTION_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_SETTINGS_CONNECTION_INTERFACE, NMSettingsConnectionInterface))

`obj` : |

### NM_SETTINGS_CONNECTION_INTERFACE_UPDATED

    #define NM_SETTINGS_CONNECTION_INTERFACE_UPDATED               "updated"

### NM_SETTINGS_CONNECTION_INTERFACE_REMOVED

    #define NM_SETTINGS_CONNECTION_INTERFACE_REMOVED               "removed"

### NMSettingsConnectionInterface

    typedef struct {
    	GTypeInterface g_iface;

    	/* Methods */
    	gboolean (*update) (NMSettingsConnectionInterface *connection,
    	                    NMSettingsConnectionInterfaceUpdateFunc callback,
    	                    gpointer user_data);

    	gboolean (*delete) (NMSettingsConnectionInterface *connection,
    	                    NMSettingsConnectionInterfaceDeleteFunc callback,
    	                    gpointer user_data);

    	gboolean (*get_secrets) (NMSettingsConnectionInterface *connection,
    	                         const char *setting_name,
                                 const char **hints,
                                 gboolean request_new,
                                 NMSettingsConnectionInterfaceGetSecretsFunc callback,
                                 gpointer user_data);

    	void (*emit_updated) (NMSettingsConnectionInterface *connection);

    	/* Signals */
    	/* 'new_settings' hash should *not* contain secrets */
    	void (*updated) (NMSettingsConnectionInterface *connection,
    	                 GHashTable *new_settings);

    	void (*removed) (NMSettingsConnectionInterface *connection);

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

### NMSettingsConnectionInterfaceUpdateFunc ()

    void                (*NMSettingsConnectionInterfaceUpdateFunc)
                                                            (NMSettingsConnectionInterface *connection,
                                                             GError *error,
                                                             gpointer user_data);

`connection` : |
`error` : |
`user_data` : |

### NMSettingsConnectionInterfaceDeleteFunc ()

    void                (*NMSettingsConnectionInterfaceDeleteFunc)
                                                            (NMSettingsConnectionInterface *connection,
                                                             GError *error,
                                                             gpointer user_data);

`connection` : |
`error` : |
`user_data` : |

### NMSettingsConnectionInterfaceGetSecretsFunc ()

    void                (*NMSettingsConnectionInterfaceGetSecretsFunc)
                                                            (NMSettingsConnectionInterface *connection,
                                                             GHashTable *secrets,
                                                             GError *error,
                                                             gpointer user_data);

`connection` : |
`secrets` : |
`error` : |
`user_data` : |

### nm_settings_connection_interface_update ()

    gboolean            nm_settings_connection_interface_update
                                                            (NMSettingsConnectionInterface *connection,
                                                             NMSettingsConnectionInterfaceUpdateFunc callback,
                                                             gpointer user_data);

Update the connection with current settings and properties.

`connection` : | an object implementing NMSettingsConnectionInterface
`callback` : | a function to be called when the update completes
`user_data` : | caller-specific data to be passed to `callback`
Returns : | TRUE on success, FALSE on failure

### nm_settings_connection_interface_delete ()

    gboolean            nm_settings_connection_interface_delete
                                                            (NMSettingsConnectionInterface *connection,
                                                             NMSettingsConnectionInterfaceDeleteFunc callback,
                                                             gpointer user_data);

Delete the connection.

`connection` : | a objecting implementing NMSettingsConnectionInterface
`callback` : | a function to be called when the delete completes
`user_data` : | caller-specific data to be passed to `callback`
Returns : | TRUE on success, FALSE on failure

### nm_settings_connection_interface_get_secrets ()

    gboolean            nm_settings_connection_interface_get_secrets
                                                            (NMSettingsConnectionInterface *connection,
                                                             const char *setting_name,
                                                             const char **hints,
                                                             gboolean request_new,
                                                             NMSettingsConnectionInterfaceGetSecretsFunc callback,
                                                             gpointer user_data);

Request the connection's secrets.

`connection` : | a object implementing NMSettingsConnectionInterface
`setting_name` : | the NMSetting object name to get secrets for
`hints` : | NMSetting key names to get secrets for (optional)
`request_new` : | hint that new secrets (instead of cached or stored secrets) should be returned
`callback` : | a function to be called when the update completes
`user_data` : | caller-specific data to be passed to `callback`
Returns : | TRUE on success, FALSE on failure

### nm_settings_connection_interface_emit_updated ()

    void                nm_settings_connection_interface_emit_updated
                                                            (NMSettingsConnectionInterface *connection);

`connection` : |