MMModemVoice: libmm-glib Reference Manual

## MMModemVoice MMModemVoice — The Voice interface |

## Functions

const gchar * | mm_modem_voice_get_path ()
gchar * | mm_modem_voice_dup_path ()
gboolean | mm_modem_voice_get_emergency_only ()
void | mm_modem_voice_create_call ()
MMCall * | mm_modem_voice_create_call_finish ()
MMCall * | mm_modem_voice_create_call_sync ()
void | mm_modem_voice_delete_call ()
gboolean | mm_modem_voice_delete_call_finish ()
gboolean | mm_modem_voice_delete_call_sync ()
void | mm_modem_voice_list_calls ()
GList * | mm_modem_voice_list_calls_finish ()
GList * | mm_modem_voice_list_calls_sync ()
void | mm_modem_voice_hangup_and_accept ()
gboolean | mm_modem_voice_hangup_and_accept_finish ()
gboolean | mm_modem_voice_hangup_and_accept_sync ()
void | mm_modem_voice_hold_and_accept ()
gboolean | mm_modem_voice_hold_and_accept_finish ()
gboolean | mm_modem_voice_hold_and_accept_sync ()
void | mm_modem_voice_hangup_all ()
gboolean | mm_modem_voice_hangup_all_finish ()
gboolean | mm_modem_voice_hangup_all_sync ()
void | mm_modem_voice_transfer ()
gboolean | mm_modem_voice_transfer_finish ()
gboolean | mm_modem_voice_transfer_sync ()
void | mm_modem_voice_call_waiting_query ()
gboolean | mm_modem_voice_call_waiting_query_finish ()
gboolean | mm_modem_voice_call_waiting_query_sync ()
void | mm_modem_voice_call_waiting_setup ()
gboolean | mm_modem_voice_call_waiting_setup_finish ()
gboolean | mm_modem_voice_call_waiting_setup_sync ()

## Types and Values

struct | MMModemVoice

## Object Hierarchy

        GObject
        ╰── GDBusProxy
            ╰── MmGdbusModemVoiceProxy
                ╰── MMModemVoice

## Implemented Interfaces

MMModemVoice implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemVoice.

## Description

The MMModemVoice is an object providing access to the methods, signals and properties of the Voice interface.

The Voice interface is exposed whenever a modem has voice capabilities.

## Functions

### mm_modem_voice_get_path ()

    const gchar *
    mm_modem_voice_get_path (MMModemVoice *self);

Gets the DBus path of the MMObject which implements this interface.

#### Parameters

self | A MMModemVoice. |

#### Returns

The DBus path of the MMObject object.

[transfer none]

Since: 1.6

### mm_modem_voice_dup_path ()

    gchar *
    mm_modem_voice_dup_path (MMModemVoice *self);

Gets a copy of the DBus path of the MMObject object which implements this interface.

#### Parameters

self | A MMModemVoice. |

#### Returns

The DBus path of the MMObject. The returned value should be freed with `g_free()`.

[transfer full]

Since: 1.6

### mm_modem_voice_get_emergency_only ()

    gboolean
    mm_modem_voice_get_emergency_only (MMModemVoice *self);

Checks whether emergency calls only are allowed.

#### Parameters

self | A MMModemVoice. |

#### Returns

`TRUE` if only emergency calls are allowed, `FALSE` otherwise.

Since: 1.12

### mm_modem_voice_create_call ()

    void
    mm_modem_voice_create_call (MMModemVoice *self,
                                MMCallProperties *properties,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously creates a new MMCall in the modem.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_create_call_finish()` to get the result of the operation.

See `mm_modem_voice_create_call_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
properties | A #MMCallProperties object with the properties to use. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.6

### mm_modem_voice_create_call_finish ()

    MMCall *
    mm_modem_voice_create_call_finish (MMModemVoice *self,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an operation started with `mm_modem_voice_create_call()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_create_call()`. |
error | Return location for error or `NULL`. |

#### Returns

A newly created MMCall, or `NULL` if `error` is set. The returned value should be freed with `g_object_unref()`.

[transfer full]

Since: 1.6

### mm_modem_voice_create_call_sync ()

    MMCall *
    mm_modem_voice_create_call_sync (MMModemVoice *self,
                                     MMCallProperties *properties,
                                     GCancellable *cancellable,
                                     GError **error);

Synchronously creates a new MMCall in the modem.

The calling thread is blocked until a reply is received. See `mm_modem_voice_create_call()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
properties | A #MMCallProperties object with the properties to use. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

A newly created MMCall, or `NULL` if `error` is set. The returned value should be freed with `g_object_unref()`.

[transfer full]

Since: 1.6

### mm_modem_voice_delete_call ()

    void
    mm_modem_voice_delete_call (MMModemVoice *self,
                                const gchar *call,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously deletes a given MMCall from the modem.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_delete_call_finish()` to get the result of the operation.

See `mm_modem_voice_delete_call_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
call | Path of the MMCall to delete. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.6

### mm_modem_voice_delete_call_finish ()

    gboolean
    mm_modem_voice_delete_call_finish (MMModemVoice *self,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an operation started with `mm_modem_voice_delete_call()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_delete_call()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call was deleted, `FALSE` if `error` is set.

Since: 1.6

### mm_modem_voice_delete_call_sync ()

    gboolean
    mm_modem_voice_delete_call_sync (MMModemVoice *self,
                                     const gchar *call,
                                     GCancellable *cancellable,
                                     GError **error);

Synchronously deletes a given MMCall from the modem.

The calling thread is blocked until a reply is received. See `mm_modem_voice_delete_call()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
call | Path of the MMCall to delete. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the CALL was deleted, `FALSE` if `error` is set.

Since: 1.6

### mm_modem_voice_list_calls ()

    void
    mm_modem_voice_list_calls (MMModemVoice *self,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously lists the MMCall objects in the modem.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_list_calls_finish()` to get the result of the operation.

See `mm_modem_voice_list_calls_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.6

### mm_modem_voice_list_calls_finish ()

    GList *
    mm_modem_voice_list_calls_finish (MMModemVoice *self,
                                      GAsyncResult *res,
                                      GError **error);

Finishes an operation started with `mm_modem_voice_list_calls()`.

#### Parameters

self | A MMModem. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_list_calls()`. |
error | Return location for error or `NULL`. |

#### Returns

A list of MMCall objects, or NULL if either not found or `error` is set. The returned value should be freed with `g_list_free_full()` using `g_object_unref()` as GDestroyNotify function.

[element-type ModemManager.Call][transfer full]

Since: 1.6

### mm_modem_voice_list_calls_sync ()

    GList *
    mm_modem_voice_list_calls_sync (MMModemVoice *self,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously lists the MMCall objects in the modem.

The calling thread is blocked until a reply is received. See `mm_modem_voice_list_calls()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

A list of MMCall objects, or NULL if either not found or `error` is set. The returned value should be freed with `g_list_free_full()` using `g_object_unref()` as GDestroyNotify function.

[element-type ModemManager.Call][transfer full]

Since: 1.6

### mm_modem_voice_hangup_and_accept ()

    void
    mm_modem_voice_hangup_and_accept (MMModemVoice *self,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously hangs up all active calls and accepts the next waiting or held call.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_hangup_and_accept_finish()` to get the result of the operation.

See `mm_modem_voice_hangup_and_accept_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.12

### mm_modem_voice_hangup_and_accept_finish ()

    gboolean
    mm_modem_voice_hangup_and_accept_finish
                                   (MMModemVoice *self,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `mm_modem_voice_hangup_and_accept()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_hangup_and_accept()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_hangup_and_accept_sync ()

    gboolean
    mm_modem_voice_hangup_and_accept_sync (MMModemVoice *self,
                                           GCancellable *cancellable,
                                           GError **error);

Synchronously hangs up all active calls and accepts the next waiting or held call.

The calling thread is blocked until a reply is received. See `mm_modem_voice_hangup_and_accept()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_hold_and_accept ()

    void
    mm_modem_voice_hold_and_accept (MMModemVoice *self,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously puts all active calls on hold and accepts the next waiting or held call.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_hold_and_accept_finish()` to get the result of the operation.

See `mm_modem_voice_hold_and_accept_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.12

### mm_modem_voice_hold_and_accept_finish ()

    gboolean
    mm_modem_voice_hold_and_accept_finish (MMModemVoice *self,
                                           GAsyncResult *res,
                                           GError **error);

Finishes an operation started with `mm_modem_voice_hold_and_accept()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_hold_and_accept()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_hold_and_accept_sync ()

    gboolean
    mm_modem_voice_hold_and_accept_sync (MMModemVoice *self,
                                         GCancellable *cancellable,
                                         GError **error);

Synchronously puts all active calls on hold and accepts the next waiting or held call.

The calling thread is blocked until a reply is received. See `mm_modem_voice_hold_and_accept()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_hangup_all ()

    void
    mm_modem_voice_hangup_all (MMModemVoice *self,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously hangs up all ongoing (active, waiting, held) calls.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_hangup_all_finish()` to get the result of the operation.

See `mm_modem_voice_hangup_all_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.12

### mm_modem_voice_hangup_all_finish ()

    gboolean
    mm_modem_voice_hangup_all_finish (MMModemVoice *self,
                                      GAsyncResult *res,
                                      GError **error);

Finishes an operation started with `mm_modem_voice_hangup_all()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_hangup_all()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_hangup_all_sync ()

    gboolean
    mm_modem_voice_hangup_all_sync (MMModemVoice *self,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously hangs up all ongoing (active, waiting, held) calls.

The calling thread is blocked until a reply is received. See `mm_modem_voice_hangup_all()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_transfer ()

    void
    mm_modem_voice_transfer (MMModemVoice *self,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

Asynchronously joins all active and held calls, and disconnects from them.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_transfer_finish()` to get the result of the operation.

See `mm_modem_voice_transfer_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.12

### mm_modem_voice_transfer_finish ()

    gboolean
    mm_modem_voice_transfer_finish (MMModemVoice *self,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `mm_modem_voice_transfer()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_transfer()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_transfer_sync ()

    gboolean
    mm_modem_voice_transfer_sync (MMModemVoice *self,
                                  GCancellable *cancellable,
                                  GError **error);

Synchronously joins all active and held calls, and disconnects from them.

The calling thread is blocked until a reply is received. See `mm_modem_voice_transfer()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation was successful, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_call_waiting_query ()

    void
    mm_modem_voice_call_waiting_query (MMModemVoice *self,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Asynchronously queries the status of the call waiting network service.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_call_waiting_query_finish()` to get the result of the operation.

See `mm_modem_voice_call_waiting_query_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.12

### mm_modem_voice_call_waiting_query_finish ()

    gboolean
    mm_modem_voice_call_waiting_query_finish
                                   (MMModemVoice *self,
                                    GAsyncResult *res,
                                    gboolean *status,
                                    GError **error);

Finishes an operation started with `mm_modem_voice_call_waiting_query()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_call_waiting_query()`. |
status | Output location where to store the status. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if `status` is set, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_call_waiting_query_sync ()

    gboolean
    mm_modem_voice_call_waiting_query_sync
                                   (MMModemVoice *self,
                                    GCancellable *cancellable,
                                    gboolean *status,
                                    GError **error);

Synchronously queries the status of the call waiting network service.

The calling thread is blocked until a reply is received. See `mm_modem_voice_call_waiting_query()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
cancellable | A GCancellable or `NULL`. | [allow-none]
status | Output location where to store the status. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if `status` is set, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_call_waiting_setup ()

    void
    mm_modem_voice_call_waiting_setup (MMModemVoice *self,
                                       gboolean enable,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Asynchronously enables or disables the call waiting network service.

When the operation is finished, `callback` will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call `mm_modem_voice_call_waiting_setup_finish()` to get the result of the operation.

See `mm_modem_voice_call_waiting_setup_sync()` for the synchronous, blocking version of this method.

#### Parameters

self | A MMModemVoice. |
enable | Whether the call waiting service should be enabled. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 1.12

### mm_modem_voice_call_waiting_setup_finish ()

    gboolean
    mm_modem_voice_call_waiting_setup_finish
                                   (MMModemVoice *self,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `mm_modem_voice_call_waiting_setup()`.

#### Parameters

self | A MMModemVoice. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_modem_voice_call_waiting_setup()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if `status` is set, `FALSE` if `error` is set.

Since: 1.12

### mm_modem_voice_call_waiting_setup_sync ()

    gboolean
    mm_modem_voice_call_waiting_setup_sync
                                   (MMModemVoice *self,
                                    gboolean enable,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously enables or disables the call waiting network service.

The calling thread is blocked until a reply is received. See `mm_modem_voice_call_waiting_setup()` for the asynchronous version of this method.

#### Parameters

self | A MMModemVoice. |
enable | Whether the call waiting service should be enabled. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the operation is successful, `FALSE` if `error` is set.

Since: 1.12

## Types and Values

### struct MMModemVoice

    struct MMModemVoice;

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