MMSimpleConnectProperties: libmm-glib Reference Manual

## MMSimpleConnectProperties MMSimpleConnectProperties — Helper object to handle connection properties. |

## Functions

MMSimpleConnectProperties * | mm_simple_connect_properties_new ()
const gchar * | mm_simple_connect_properties_get_pin ()
void | mm_simple_connect_properties_set_pin ()
const gchar * | mm_simple_connect_properties_get_operator_id ()
void | mm_simple_connect_properties_set_operator_id ()
const gchar * | mm_simple_connect_properties_get_apn ()
void | mm_simple_connect_properties_set_apn ()
MMBearerApnType | mm_simple_connect_properties_get_apn_type ()
void | mm_simple_connect_properties_set_apn_type ()
MMBearerAllowedAuth | mm_simple_connect_properties_get_allowed_auth ()
void | mm_simple_connect_properties_set_allowed_auth ()
const gchar * | mm_simple_connect_properties_get_user ()
void | mm_simple_connect_properties_set_user ()
const gchar * | mm_simple_connect_properties_get_password ()
void | mm_simple_connect_properties_set_password ()
MMBearerIpFamily | mm_simple_connect_properties_get_ip_type ()
void | mm_simple_connect_properties_set_ip_type ()
gint | mm_simple_connect_properties_get_profile_id ()
void | mm_simple_connect_properties_set_profile_id ()
gboolean | mm_simple_connect_properties_get_allow_roaming ()
void | mm_simple_connect_properties_set_allow_roaming ()
MMModemCdmaRmProtocol | mm_simple_connect_properties_get_rm_protocol ()
void | mm_simple_connect_properties_set_rm_protocol ()
MMBearerMultiplexSupport | mm_simple_connect_properties_get_multiplex ()
void | mm_simple_connect_properties_set_multiplex ()

## Types and Values

struct | MMSimpleConnectProperties

## Object Hierarchy

        GObject
        ╰── MMSimpleConnectProperties

## Description

The MMSimpleConnectProperties is an object handling the properties requested to ModemManager when launching a connection with the Simple interface.

This object is created by the user and passed to ModemManager with either `mm_modem_simple_connect()` or `mm_modem_simple_connect_sync()`.

## Functions

### mm_simple_connect_properties_new ()

    MMSimpleConnectProperties *
    mm_simple_connect_properties_new (void);

Creates a new empty MMSimpleConnectProperties.

#### Returns

a MMSimpleConnectProperties. The returned value should be freed with `g_object_unref()`.

[transfer full]

Since: 1.0

### mm_simple_connect_properties_get_pin ()

    const gchar *
    mm_simple_connect_properties_get_pin (MMSimpleConnectProperties *self);

Gets the PIN code to use when unlocking the modem.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

the PIN, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_simple_connect_properties_set_pin ()

    void
    mm_simple_connect_properties_set_pin (MMSimpleConnectProperties *self,
                                          const gchar *pin);

Sets the PIN code to use when unlocking the modem.

#### Parameters

self | a MMSimpleConnectProperties. |
pin | PIN code. |

Since: 1.0

### mm_simple_connect_properties_get_operator_id ()

    const gchar *
    mm_simple_connect_properties_get_operator_id
                                   (MMSimpleConnectProperties *self);

Gets the ID of the network to which register before connecting.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

the operator ID, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_simple_connect_properties_set_operator_id ()

    void
    mm_simple_connect_properties_set_operator_id
                                   (MMSimpleConnectProperties *self,
                                    const gchar *operator_id);

Sets the ID of the network to which register before connecting.

#### Parameters

self | a MMSimpleConnectProperties. |
operator_id | operator ID, given as MCC/MNC. |

Since: 1.0

### mm_simple_connect_properties_get_apn ()

    const gchar *
    mm_simple_connect_properties_get_apn (MMSimpleConnectProperties *self);

Gets the name of the access point to use when connecting.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

the access point, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_simple_connect_properties_set_apn ()

    void
    mm_simple_connect_properties_set_apn (MMSimpleConnectProperties *self,
                                          const gchar *apn);

Sets the name of the access point to use when connecting.

#### Parameters

self | a MMSimpleConnectProperties. |
apn | Name of the access point. |

Since: 1.0

### mm_simple_connect_properties_get_apn_type ()

    MMBearerApnType
    mm_simple_connect_properties_get_apn_type
                                   (MMSimpleConnectProperties *self);

Gets the APN types to use.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

a mask of MMBearerApnType values.

Since: 1.18

### mm_simple_connect_properties_set_apn_type ()

    void
    mm_simple_connect_properties_set_apn_type
                                   (MMSimpleConnectProperties *self,
                                    MMBearerApnType apn_type);

Sets the APN types to use.

#### Parameters

self | a MMSimpleConnectProperties. |
apn_type | a mask of MMBearerApnType values. |

Since: 1.18

### mm_simple_connect_properties_get_allowed_auth ()

    MMBearerAllowedAuth
    mm_simple_connect_properties_get_allowed_auth
                                   (MMSimpleConnectProperties *self);

Gets the authentication methods allowed in the connection.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

a bitmask of MMBearerAllowedAuth values, or `MM_BEARER_ALLOWED_AUTH_UNKNOWN` to request the modem-default method.

Since: 1.0

### mm_simple_connect_properties_set_allowed_auth ()

    void
    mm_simple_connect_properties_set_allowed_auth
                                   (MMSimpleConnectProperties *self,
                                    MMBearerAllowedAuth allowed_auth);

Sets the authentication method to use.

#### Parameters

self | a MMSimpleConnectProperties. |
allowed_auth | a bitmask of MMBearerAllowedAuth values. `MM_BEARER_ALLOWED_AUTH_UNKNOWN` may be given to request the modem-default method. |

Since: 1.0

### mm_simple_connect_properties_get_user ()

    const gchar *
    mm_simple_connect_properties_get_user (MMSimpleConnectProperties *self);

Gets the username used to authenticate with the access point.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

the username, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_simple_connect_properties_set_user ()

    void
    mm_simple_connect_properties_set_user (MMSimpleConnectProperties *self,
                                           const gchar *user);

Sets the username used to authenticate with the access point.

#### Parameters

self | a MMSimpleConnectProperties. |
user | the username |

Since: 1.0

### mm_simple_connect_properties_get_password ()

    const gchar *
    mm_simple_connect_properties_get_password
                                   (MMSimpleConnectProperties *self);

Gets the password used to authenticate with the access point.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

the password, or NULL if not set. Do not free the returned value, it is owned by `self` .

[transfer none]

Since: 1.0

### mm_simple_connect_properties_set_password ()

    void
    mm_simple_connect_properties_set_password
                                   (MMSimpleConnectProperties *self,
                                    const gchar *password);

Sets the password used to authenticate with the access point.

#### Parameters

self | a MMSimpleConnectProperties. |
password | the password |

Since: 1.0

### mm_simple_connect_properties_get_ip_type ()

    MMBearerIpFamily
    mm_simple_connect_properties_get_ip_type
                                   (MMSimpleConnectProperties *self);

Sets the IP type to use.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

a MMBearerIpFamily.

Since: 1.0

### mm_simple_connect_properties_set_ip_type ()

    void
    mm_simple_connect_properties_set_ip_type
                                   (MMSimpleConnectProperties *self,
                                    MMBearerIpFamily ip_type);

Sets the IP type to use.

#### Parameters

self | a MMSimpleConnectProperties. |
ip_type | a MMBearerIpFamily. |

Since: 1.0

### mm_simple_connect_properties_get_profile_id ()

    gint
    mm_simple_connect_properties_get_profile_id
                                   (MMSimpleConnectProperties *self);

Gets the profile ID to use.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

the profile id.

Since: 1.18

### mm_simple_connect_properties_set_profile_id ()

    void
    mm_simple_connect_properties_set_profile_id
                                   (MMSimpleConnectProperties *self,
                                    gint profile_id);

Sets the profile ID to use.

#### Parameters

self | a MMSimpleConnectProperties. |
profile_id | a profile id. |

Since: 1.18

### mm_simple_connect_properties_get_allow_roaming ()

    gboolean
    mm_simple_connect_properties_get_allow_roaming
                                   (MMSimpleConnectProperties *self);

Checks whether roaming is allowed in the connection.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

`TRUE` if roaming is allowed, `FALSE` otherwise.

Since: 1.0

### mm_simple_connect_properties_set_allow_roaming ()

    void
    mm_simple_connect_properties_set_allow_roaming
                                   (MMSimpleConnectProperties *self,
                                    gboolean allow_roaming);

Sets the flag to indicate whether roaming is allowed or not in the connection.

#### Parameters

self | a MMSimpleConnectProperties. |
allow_roaming | boolean value. |

Since: 1.0

### mm_simple_connect_properties_get_rm_protocol ()

    MMModemCdmaRmProtocol
    mm_simple_connect_properties_get_rm_protocol
                                   (MMSimpleConnectProperties *self);

Get the RM protocol requested by the user.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

a MMModemCdmaRmProtocol.

Since: 1.16

### mm_simple_connect_properties_set_rm_protocol ()

    void
    mm_simple_connect_properties_set_rm_protocol
                                   (MMSimpleConnectProperties *self,
                                    MMModemCdmaRmProtocol protocol);

Sets the RM protocol requested by the user.

#### Parameters

self | a MMSimpleConnectProperties. |
protocol | a MMModemCdmaRmProtocol. |

Since: 1.16

### mm_simple_connect_properties_get_multiplex ()

    MMBearerMultiplexSupport
    mm_simple_connect_properties_get_multiplex
                                   (MMSimpleConnectProperties *self);

Get the multiplex support requested by the user.

#### Parameters

self | a MMSimpleConnectProperties. |

#### Returns

a MMBearerMultiplexSupport.

Since: 1.18

### mm_simple_connect_properties_set_multiplex ()

    void
    mm_simple_connect_properties_set_multiplex
                                   (MMSimpleConnectProperties *self,
                                    MMBearerMultiplexSupport multiplex);

Sets the multiplex support requested by the user.

#### Parameters

self | a MMSimpleConnectProperties. |
multiplex | a MMBearerMultiplexSupport. |

Since: 1.18

## Types and Values

### struct MMSimpleConnectProperties

    struct MMSimpleConnectProperties;

The MMSimpleConnectProperties structure contains private data and should only be accessed using the provided API.