## UUIDs UUIDs — Generic UUID handling routines. |

## Functions

const gchar * | mbim_service_get_string ()
const gchar * | mbim_service_lookup_name ()
guint | mbim_register_custom_service ()
gboolean | mbim_unregister_custom_service ()
gboolean | mbim_service_id_is_custom ()
const gchar * | mbim_context_type_get_string ()
gboolean | mbim_uuid_cmp ()
gboolean | mbim_uuid_from_printable ()
gchar * | mbim_uuid_get_printable ()
const MbimUuid * | mbim_uuid_from_service ()
MbimService | mbim_uuid_to_service ()
const MbimUuid * | mbim_uuid_from_context_type ()
MbimContextType | mbim_uuid_to_context_type ()

## Types and Values

enum | MbimService
enum | MbimContextType
| MbimUuid
#define | MBIM_UUID_INVALID
#define | MBIM_UUID_ATDS
#define | MBIM_UUID_BASIC_CONNECT
#define | MBIM_UUID_SMS
#define | MBIM_UUID_USSD
#define | MBIM_UUID_PHONEBOOK
#define | MBIM_UUID_STK
#define | MBIM_UUID_AUTH
#define | MBIM_UUID_DSS
#define | MBIM_UUID_MS_FIRMWARE_ID
#define | MBIM_UUID_MS_HOST_SHUTDOWN
#define | MBIM_UUID_PROXY_CONTROL
#define | MBIM_UUID_QMI
#define | MBIM_UUID_QDU
#define | MBIM_UUID_INTEL_FIRMWARE_UPDATE
#define | MBIM_UUID_MS_BASIC_CONNECT_EXTENSIONS
#define | MBIM_UUID_MS_SAR
#define | MBIM_UUID_MS_UICC_LOW_LEVEL_ACCESS
#define | MBIM_UUID_QUECTEL

## Object Hierarchy

        GEnum
        ├── MbimContextType
        ╰── MbimService

## Description

This section defines the data type for unique identifiers.

## Functions

### mbim_service_get_string ()

    const gchar *
    mbim_service_get_string (MbimService val);

Gets the nickname string for the MbimService specified at `val` .

#### Parameters

val | a MbimService. |

#### Returns

a string with the nickname, or `NULL` if not found. Do not free the returned value.

[transfer none]

Since: 1.0

### mbim_service_lookup_name ()

    const gchar *
    mbim_service_lookup_name (guint service);

Gets the nickname string for the `service` .

As opposed to `mbim_service_get_string()`, this methods takes into account custom services that may have been registered by the user.

#### Parameters

service | a MbimService or custom service. |

#### Returns

a string with the nickname, or `NULL` if not found. Do not free the returned value.

[transfer none]

Since: 1.10

### mbim_register_custom_service ()

    guint
    mbim_register_custom_service (const MbimUuid *uuid,
                                  const gchar *nickname);

Register a custom service

#### Parameters

uuid | MbimUuid structure corresponding to service |
nickname | a printable name for service |

#### Returns

TRUE if service has been registered, FALSE otherwise.

Since: 1.10

### mbim_unregister_custom_service ()

    gboolean
    mbim_unregister_custom_service (const guint id);

Unregister a custom service.

#### Parameters

id | ID of the service to unregister.MbimUuid structure corresponding to service |

#### Returns

TRUE if service has been unregistered, FALSE otherwise.

Since: 1.10

### mbim_service_id_is_custom ()

    gboolean
    mbim_service_id_is_custom (const guint id);

Checks whether `id` is a custom or standard service.

#### Parameters

id | ID of the service |

#### Returns

TRUE if service is custom, FALSE otherwise.

Since: 1.10

### mbim_context_type_get_string ()

    const gchar *
    mbim_context_type_get_string (MbimContextType val);

Gets the nickname string for the MbimContextType specified at `val` .

#### Parameters

val | a MbimContextType. |

#### Returns

a string with the nickname, or `NULL` if not found. Do not free the returned value.

[transfer none]

Since: 1.0

### mbim_uuid_cmp ()

    gboolean
    mbim_uuid_cmp (const MbimUuid *a,
                   const MbimUuid *b);

Compare two `MbimUuid` values.

#### Parameters

a | a MbimUuid. |
b | a MbimUuid. |

#### Returns

`TRUE` if `a` and `b` are equal, `FALSE` otherwise.

Since: 1.0

### mbim_uuid_from_printable ()

    gboolean
    mbim_uuid_from_printable (const gchar *str,
                              MbimUuid *uuid);

Fills in `uuid` from the printable representation give in `str` .

Only ccepts `str` written with dashes separating items, e.g.: a289cc33-bcbb-8b4f-b6b0-133ec2aae6df

#### Parameters

str | a MBIM UUID. |
uuid | pointer to the target MbimUuid. |

#### Returns

`TRUE` if `uuid` was correctly set, `FALSE` otherwise.

Since: 1.8

### mbim_uuid_get_printable ()

    gchar *
    mbim_uuid_get_printable (const MbimUuid *uuid);

Get a string with the UUID.

#### Parameters

uuid | a MbimUuid. |

#### Returns

a newly allocated string, which should be freed with `g_free()`.

[transfer full]

Since: 1.0

### mbim_uuid_from_service ()

    const MbimUuid *
    mbim_uuid_from_service (MbimService service);

Get the UUID corresponding to `service` .

The `service` needs to be either a generic one (including MBIM_SERVICE_INVALID) or a custom registered one.

#### Parameters

service | a MbimService. |

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### mbim_uuid_to_service ()

    MbimService
    mbim_uuid_to_service (const MbimUuid *uuid);

Get the service corresponding to `uuid` .

#### Parameters

uuid | a MbimUuid. |

#### Returns

a MbimService.

Since: 1.0

### mbim_uuid_from_context_type ()

    const MbimUuid *
    mbim_uuid_from_context_type (MbimContextType context_type);

Get the UUID corresponding to `context_type` .

#### Parameters

context_type | a MbimContextType. |

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### mbim_uuid_to_context_type ()

    MbimContextType
    mbim_uuid_to_context_type (const MbimUuid *uuid);

Get the context type corresponding to `uuid` .

#### Parameters

uuid | a MbimUuid. |

#### Returns

a MbimContextType.

Since: 1.0

## Types and Values

### enum MbimService

Enumeration of the generic MBIM services.

#### Members

MBIM_SERVICE_INVALID | Invalid service. |
MBIM_SERVICE_BASIC_CONNECT | Basic connectivity service. |
MBIM_SERVICE_SMS | SMS messaging service. |
MBIM_SERVICE_USSD | USSD service. |
MBIM_SERVICE_PHONEBOOK | Phonebook service. |
MBIM_SERVICE_STK | SIM toolkit service. |
MBIM_SERVICE_AUTH | Authentication service. |
MBIM_SERVICE_DSS | Device Service Stream service. |
MBIM_SERVICE_MS_FIRMWARE_ID | Microsoft Firmware ID service. Since 1.8. |
MBIM_SERVICE_MS_HOST_SHUTDOWN | Microsoft Host Shutdown service. Since 1.8. |
MBIM_SERVICE_PROXY_CONTROL | Proxy Control service. Since 1.10. |
MBIM_SERVICE_QMI | QMI-over-MBIM service. Since 1.14. |
MBIM_SERVICE_ATDS | ATT Device service. Since 1.16. |
MBIM_SERVICE_INTEL_FIRMWARE_UPDATE | Intel firmware update service. Since 1.16. |
MBIM_SERVICE_MS_BASIC_CONNECT_EXTENSIONS | Microsoft basic connectivity extensions service. Since 1.18. |
MBIM_SERVICE_MS_SAR | Microsoft SAR service. Since 1.26. |
MBIM_SERVICE_QDU | QDU firmware update service. Since 1.26. |
MBIM_SERVICE_MS_UICC_LOW_LEVEL_ACCESS | Microsoft UICC Low Level Access service. Since 1.26. |
MBIM_SERVICE_QUECTEL | Quectel specific operations. Since 1.26.2. |
MBIM_SERVICE_LAST | Internal value. |

Since: 1.0

### enum MbimContextType

Enumeration of the generic MBIM context types.

#### Members

MBIM_CONTEXT_TYPE_INVALID | Invalid context type. |
MBIM_CONTEXT_TYPE_NONE | Context not yet provisioned. |
MBIM_CONTEXT_TYPE_INTERNET | Connection to the Internet. |
MBIM_CONTEXT_TYPE_VPN | Connection to a VPN. |
MBIM_CONTEXT_TYPE_VOICE | Connection to a VoIP service. |
MBIM_CONTEXT_TYPE_VIDEO_SHARE | Connection to a video sharing service. |
MBIM_CONTEXT_TYPE_PURCHASE | Connection to an over-the-air activation site. |
MBIM_CONTEXT_TYPE_IMS | Connection to IMS. |
MBIM_CONTEXT_TYPE_MMS | Connection to MMS. |
MBIM_CONTEXT_TYPE_LOCAL | A local. |

Since: 1.0

### MbimUuid

    typedef struct _MbimUuid MbimUuid;

A UUID as defined in MBIM.

Since: 1.0

### MBIM_UUID_INVALID

    #define MBIM_UUID_INVALID mbim_uuid_from_service (MBIM_SERVICE_INVALID)

Get the UUID of the `MBIM_SERVICE_INVALID` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_ATDS

    #define MBIM_UUID_ATDS mbim_uuid_from_service (MBIM_SERVICE_ATDS)

Get the UUID of the `MBIM_SERVICE_ATDS` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.16

### MBIM_UUID_BASIC_CONNECT

    #define MBIM_UUID_BASIC_CONNECT mbim_uuid_from_service (MBIM_SERVICE_BASIC_CONNECT)

Get the UUID of the `MBIM_SERVICE_BASIC_CONNECT` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_SMS

    #define MBIM_UUID_SMS mbim_uuid_from_service (MBIM_SERVICE_SMS)

Get the UUID of the `MBIM_SERVICE_SMS` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_USSD

    #define MBIM_UUID_USSD mbim_uuid_from_service (MBIM_SERVICE_USSD)

Get the UUID of the `MBIM_SERVICE_USSD` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_PHONEBOOK

    #define MBIM_UUID_PHONEBOOK mbim_uuid_from_service (MBIM_SERVICE_PHONEBOOK)

Get the UUID of the `MBIM_SERVICE_PHONEBOOK` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_STK

    #define MBIM_UUID_STK mbim_uuid_from_service (MBIM_SERVICE_STK)

Get the UUID of the `MBIM_SERVICE_STK` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_AUTH

    #define MBIM_UUID_AUTH mbim_uuid_from_service (MBIM_SERVICE_AUTH)

Get the UUID of the `MBIM_SERVICE_AUTH` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_DSS

    #define MBIM_UUID_DSS mbim_uuid_from_service (MBIM_SERVICE_DSS)

Get the UUID of the `MBIM_SERVICE_DSS` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.0

### MBIM_UUID_MS_FIRMWARE_ID

    #define MBIM_UUID_MS_FIRMWARE_ID mbim_uuid_from_service (MBIM_SERVICE_MS_FIRMWARE_ID)

Get the UUID of the `MBIM_SERVICE_MS_FIRMWARE_ID` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.8

### MBIM_UUID_MS_HOST_SHUTDOWN

    #define MBIM_UUID_MS_HOST_SHUTDOWN mbim_uuid_from_service (MBIM_SERVICE_MS_HOST_SHUTDOWN)

Get the UUID of the `MBIM_SERVICE_MS_HOST_SHUTDOWN` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.8

### MBIM_UUID_PROXY_CONTROL

    #define MBIM_UUID_PROXY_CONTROL mbim_uuid_from_service (MBIM_SERVICE_PROXY_CONTROL)

Get the UUID of the `MBIM_SERVICE_PROXY_CONTROL` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.10

### MBIM_UUID_QMI

    #define MBIM_UUID_QMI mbim_uuid_from_service (MBIM_SERVICE_QMI)

Get the UUID of the `MBIM_SERVICE_QMI` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.14

### MBIM_UUID_QDU

    #define MBIM_UUID_QDU mbim_uuid_from_service (MBIM_SERVICE_QDU)

Get the UUID of the `MBIM_SERVICE_QDU` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.26

### MBIM_UUID_INTEL_FIRMWARE_UPDATE

    #define MBIM_UUID_INTEL_FIRMWARE_UPDATE mbim_uuid_from_service (MBIM_SERVICE_INTEL_FIRMWARE_UPDATE)

Get the UUID of the `MBIM_SERVICE_INTEL_FIRMWARE_UPDATE` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.16

### MBIM_UUID_MS_BASIC_CONNECT_EXTENSIONS

    #define MBIM_UUID_MS_BASIC_CONNECT_EXTENSIONS mbim_uuid_from_service (MBIM_SERVICE_MS_BASIC_CONNECT_EXTENSIONS)

Get the UUID of the `MBIM_SERVICE_MS_BASIC_CONNECT_EXTENSIONS` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.18

### MBIM_UUID_MS_SAR

    #define MBIM_UUID_MS_SAR mbim_uuid_from_service (MBIM_SERVICE_MS_SAR)

Get the UUID of the `MBIM_SERVICE_MS_SAR` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.26

### MBIM_UUID_MS_UICC_LOW_LEVEL_ACCESS

    #define MBIM_UUID_MS_UICC_LOW_LEVEL_ACCESS mbim_uuid_from_service (MBIM_SERVICE_MS_UICC_LOW_LEVEL_ACCESS)

Get the UUID of the `MBIM_SERVICE_MS_UICC_LOW_LEVEL_ACCESS` service.

#### Returns

a MbimUuid.

[transfer none]

### MBIM_UUID_QUECTEL

    #define MBIM_UUID_QUECTEL mbim_uuid_from_service (MBIM_SERVICE_QUECTEL)

Get the UUID of the `MBIM_SERVICE_QUECTEL` service.

#### Returns

a MbimUuid.

[transfer none]

Since: 1.26.2