## Phonebook Phonebook |

## Functions

void | mbim_phonebook_entry_array_free ()
MbimMessage * | mbim_message_phonebook_configuration_query_new ()
gboolean | mbim_message_phonebook_configuration_response_parse ()
gboolean | mbim_message_phonebook_configuration_notification_parse ()
MbimMessage * | mbim_message_phonebook_read_query_new ()
gboolean | mbim_message_phonebook_read_response_parse ()
MbimMessage * | mbim_message_phonebook_delete_set_new ()
gboolean | mbim_message_phonebook_delete_response_parse ()
MbimMessage * | mbim_message_phonebook_write_set_new ()
gboolean | mbim_message_phonebook_write_response_parse ()

## Types and Values

| MbimPhonebookEntry

## Description

## Functions

### mbim_phonebook_entry_array_free ()

    void
    mbim_phonebook_entry_array_free (MbimPhonebookEntry **array);

Frees the memory allocated for the array of MbimPhonebookEntrys.

#### Parameters

array | a NULL terminated array of MbimPhonebookEntry structs. |

### mbim_message_phonebook_configuration_query_new ()

    MbimMessage *
    mbim_message_phonebook_configuration_query_new
                                   (GError **error);

Create a new request for the 'Configuration' query command in the 'Phonebook' service.

#### Parameters

error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_phonebook_configuration_response_parse ()

    gboolean
    mbim_message_phonebook_configuration_response_parse
                                   (const MbimMessage *message,
                                    MbimPhonebookState *state,
                                    guint32 *number_of_entries,
                                    guint32 *used_entries,
                                    guint32 *max_number_length,
                                    guint32 *max_name,
                                    GError **error);

Parses and returns parameters of the 'Configuration' response command in the 'Phonebook' service.

#### Parameters

message | the MbimMessage. |
state | return location for a MbimPhonebookState, or `NULL` if the 'State' field is not needed. |
number_of_entries | return location for a guint32, or `NULL` if the 'NumberOfEntries' field is not needed. |
used_entries | return location for a guint32, or `NULL` if the 'UsedEntries' field is not needed. |
max_number_length | return location for a guint32, or `NULL` if the 'MaxNumberLength' field is not needed. |
max_name | return location for a guint32, or `NULL` if the 'MaxName' field is not needed. |
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_phonebook_configuration_notification_parse ()

    gboolean
    mbim_message_phonebook_configuration_notification_parse
                                   (const MbimMessage *message,
                                    MbimPhonebookState *state,
                                    guint32 *number_of_entries,
                                    guint32 *used_entries,
                                    guint32 *max_number_length,
                                    guint32 *max_name,
                                    GError **error);

Parses and returns parameters of the 'Configuration' notification command in the 'Phonebook' service.

#### Parameters

message | the MbimMessage. |
state | return location for a MbimPhonebookState, or `NULL` if the 'State' field is not needed. |
number_of_entries | return location for a guint32, or `NULL` if the 'NumberOfEntries' field is not needed. |
used_entries | return location for a guint32, or `NULL` if the 'UsedEntries' field is not needed. |
max_number_length | return location for a guint32, or `NULL` if the 'MaxNumberLength' field is not needed. |
max_name | return location for a guint32, or `NULL` if the 'MaxName' field is not needed. |
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_phonebook_read_query_new ()

    MbimMessage *
    mbim_message_phonebook_read_query_new (MbimPhonebookFlag filter_flag,
                                           guint32 filter_message_index,
                                           GError **error);

Create a new request for the 'Read' query command in the 'Phonebook' service.

#### Parameters

filter_flag | the 'FilterFlag' field, given as a MbimPhonebookFlag. |
filter_message_index | the 'FilterMessageIndex' field, given as a guint32. |
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_phonebook_read_response_parse ()

    gboolean
    mbim_message_phonebook_read_response_parse
                                   (const MbimMessage *message,
                                    guint32 *entry_count,
                                    MbimPhonebookEntry ***entries,
                                    GError **error);

Parses and returns parameters of the 'Read' response command in the 'Phonebook' service.

#### Parameters

message | the MbimMessage. |
entry_count | return location for a guint32, or `NULL` if the 'EntryCount' field is not needed. |
entries | return location for a newly allocated array of MbimPhonebookEntrys, or `NULL` if the 'Entries' field is not needed. Free the returned value with `mbim_phonebook_entry_array_free()`. |
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_phonebook_delete_set_new ()

    MbimMessage *
    mbim_message_phonebook_delete_set_new (MbimPhonebookFlag filter_flag,
                                           guint32 filter_message_index,
                                           GError **error);

Create a new request for the 'Delete' set command in the 'Phonebook' service.

#### Parameters

filter_flag | the 'FilterFlag' field, given as a MbimPhonebookFlag. |
filter_message_index | the 'FilterMessageIndex' field, given as a guint32. |
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_phonebook_delete_response_parse ()

    gboolean
    mbim_message_phonebook_delete_response_parse
                                   (const MbimMessage *message,
                                    GError **error);

Parses and returns parameters of the 'Delete' response command in the 'Phonebook' service.

#### Parameters

message | the MbimMessage. |
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_phonebook_write_set_new ()

    MbimMessage *
    mbim_message_phonebook_write_set_new (MbimPhonebookWriteFlag save_flag,
                                          guint32 save_index,
                                          const gchar *number,
                                          const gchar *name,
                                          GError **error);

Create a new request for the 'Write' set command in the 'Phonebook' service.

#### Parameters

save_flag | the 'SaveFlag' field, given as a MbimPhonebookWriteFlag. |
save_index | the 'SaveIndex' field, given as a guint32. |
number | the 'Number' field, given as a string. |
name | the 'Name' field, given as a string. |
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_phonebook_write_response_parse ()

    gboolean
    mbim_message_phonebook_write_response_parse
                                   (const MbimMessage *message,
                                    GError **error);

Parses and returns parameters of the 'Write' response command in the 'Phonebook' service.

#### Parameters

message | the MbimMessage. |
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

## Types and Values

### MbimPhonebookEntry

    typedef struct {
        guint32 entry_index;
        gchar *number;
        gchar *name;
    } MbimPhonebookEntry;

#### Members

guint32 `entry_index`; | a guint32. |
gchar *`number`; | a string. |
gchar *`name`; | a string. |