NMSettingGsm
3
LIBNM-UTIL Library

# NMSettingGsm

## Synopsis

    #define             NM_SETTING_GSM_SETTING_NAME
    enum                NMSettingGsmError;
    #define             NM_TYPE_SETTING_GSM_ERROR
    #define             NM_SETTING_GSM_ERROR
    GQuark              nm_setting_gsm_error_quark          (void);
    #define             NM_SETTING_GSM_NUMBER
    #define             NM_SETTING_GSM_USERNAME
    #define             NM_SETTING_GSM_PASSWORD
    #define             NM_SETTING_GSM_APN
    #define             NM_SETTING_GSM_NETWORK_ID
    #define             NM_SETTING_GSM_NETWORK_TYPE
    #define             NM_SETTING_GSM_BAND
    #define             NM_SETTING_GSM_PIN
    #define             NM_SETTING_GSM_PUK
                        NMSettingGsm;
    GType               nm_setting_gsm_get_type             (void);
    NMSetting *         nm_setting_gsm_new                  (void);
    const char *        nm_setting_gsm_get_number           (NMSettingGsm *setting);
    const char *        nm_setting_gsm_get_username         (NMSettingGsm *setting);
    const char *        nm_setting_gsm_get_password         (NMSettingGsm *setting);
    const char *        nm_setting_gsm_get_apn              (NMSettingGsm *setting);
    const char *        nm_setting_gsm_get_network_id       (NMSettingGsm *setting);
    int                 nm_setting_gsm_get_network_type     (NMSettingGsm *setting);
    int                 nm_setting_gsm_get_band             (NMSettingGsm *setting);
    const char *        nm_setting_gsm_get_pin              (NMSettingGsm *setting);
    const char *        nm_setting_gsm_get_puk              (NMSettingGsm *setting);

## Object Hierarchy

      GObject
       +----NMSetting
             +----NMSettingGsm

## Properties

      "apn"                      gchar*                : Read / Write
      "band"                     gint                  : Read / Write / Construct
      "network-id"               gchar*                : Read / Write
      "network-type"             gint                  : Read / Write / Construct
      "number"                   gchar*                : Read / Write
      "password"                 gchar*                : Read / Write
      "pin"                      gchar*                : Read / Write
      "puk"                      gchar*                : Read / Write
      "username"                 gchar*                : Read / Write

## Description

## Details

### NM_SETTING_GSM_SETTING_NAME

    #define NM_SETTING_GSM_SETTING_NAME "gsm"

### enum NMSettingGsmError

    typedef enum
    {
    	NM_SETTING_GSM_ERROR_UNKNOWN = 0,
    	NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
    	NM_SETTING_GSM_ERROR_MISSING_PROPERTY,
    	NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING
    } NMSettingGsmError;

### NM_TYPE_SETTING_GSM_ERROR

    #define NM_TYPE_SETTING_GSM_ERROR (nm_setting_gsm_error_get_type ())

### NM_SETTING_GSM_ERROR

    #define NM_SETTING_GSM_ERROR nm_setting_gsm_error_quark ()

### nm_setting_gsm_error_quark ()

    GQuark              nm_setting_gsm_error_quark          (void);

Returns :

### NM_SETTING_GSM_NUMBER

    #define NM_SETTING_GSM_NUMBER       "number"

### NM_SETTING_GSM_USERNAME

    #define NM_SETTING_GSM_USERNAME     "username"

### NM_SETTING_GSM_PASSWORD

    #define NM_SETTING_GSM_PASSWORD     "password"

### NM_SETTING_GSM_APN

    #define NM_SETTING_GSM_APN          "apn"

### NM_SETTING_GSM_NETWORK_ID

    #define NM_SETTING_GSM_NETWORK_ID   "network-id"

### NM_SETTING_GSM_NETWORK_TYPE

    #define NM_SETTING_GSM_NETWORK_TYPE "network-type"

### NM_SETTING_GSM_BAND

    #define NM_SETTING_GSM_BAND         "band"

### NM_SETTING_GSM_PIN

    #define NM_SETTING_GSM_PIN          "pin"

### NM_SETTING_GSM_PUK

    #define NM_SETTING_GSM_PUK          "puk"

### NMSettingGsm

    typedef struct _NMSettingGsm NMSettingGsm;

### nm_setting_gsm_get_type ()

    GType               nm_setting_gsm_get_type             (void);

Returns :

### nm_setting_gsm_new ()

    NMSetting *         nm_setting_gsm_new                  (void);

Returns :

### nm_setting_gsm_get_number ()

    const char *        nm_setting_gsm_get_number           (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_username ()

    const char *        nm_setting_gsm_get_username         (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_password ()

    const char *        nm_setting_gsm_get_password         (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_apn ()

    const char *        nm_setting_gsm_get_apn              (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_network_id ()

    const char *        nm_setting_gsm_get_network_id       (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_network_type ()

    int                 nm_setting_gsm_get_network_type     (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_band ()

    int                 nm_setting_gsm_get_band             (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_pin ()

    const char *        nm_setting_gsm_get_pin              (NMSettingGsm *setting);

`setting` :

Returns :

### nm_setting_gsm_get_puk ()

    const char *        nm_setting_gsm_get_puk              (NMSettingGsm *setting);

`setting` :

Returns :

## Property Details

### The `"apn"` property

      "apn"                      gchar*                : Read / Write

The GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan.

Default value: NULL

### The `"band"` property

      "band"                     gint                  : Read / Write / Construct

Band (currently unused).

Allowed values: [-1,5]

Default value: -1

### The `"network-id"` property

      "network-id"               gchar*                : Read / Write

The Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible.

Default value: NULL

### The `"network-type"` property

      "network-type"             gint                  : Read / Write / Construct

Network preference to force the device to only use specific network technologies. The permitted values are: -1: any, 0: 3G only, 1: GPRS/EDGE only, 2: prefer 3G, and 3: prefer 2G. Note that not all devices allow network preference control.

Allowed values: [-1,2]

Default value: -1

### The `"number"` property

      "number"                   gchar*                : Read / Write

Number to dial when establishing a PPP data session with the GSM-based mobile broadband network. In most cases, leave the number blank and a number selecting the APN specified in the 'apn' property will be used automatically when required.

Default value: NULL

### The `"password"` property

      "password"                 gchar*                : Read / Write

The password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.

Default value: NULL

### The `"pin"` property

      "pin"                      gchar*                : Read / Write

If the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device.

Default value: NULL

### The `"puk"` property

      "puk"                      gchar*                : Read / Write

If the PIN is incorrectly entered too many times, the PUK (PIN Unlock Code) is required before the device becomes operational. It's usually best not to enter the PUK due to the risk of completely locking your SIM by entering a wrong PUK too many times.

Default value: NULL

### The `"username"` property

      "username"                 gchar*                : Read / Write

The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.

Default value: NULL