MMCall: libmm-glib Reference Manual

## MMCall MMCall — The call interface |

## Functions

const gchar * | mm_call_get_path ()
gchar * | mm_call_dup_path ()
const gchar * | mm_call_get_number ()
gchar * | mm_call_dup_number ()
MMCallDirection | mm_call_get_direction ()
MMCallState | mm_call_get_state ()
MMCallStateReason | mm_call_get_state_reason ()
const gchar * | mm_call_get_audio_port ()
gchar * | mm_call_dup_audio_port ()
MMCallAudioFormat * | mm_call_get_audio_format ()
MMCallAudioFormat * | mm_call_peek_audio_format ()
gboolean | mm_call_get_multiparty ()
void | mm_call_start ()
gboolean | mm_call_start_finish ()
gboolean | mm_call_start_sync ()
void | mm_call_accept ()
gboolean | mm_call_accept_finish ()
gboolean | mm_call_accept_sync ()
void | mm_call_hangup ()
gboolean | mm_call_hangup_finish ()
gboolean | mm_call_hangup_sync ()
void | mm_call_send_dtmf ()
gboolean | mm_call_send_dtmf_finish ()
gboolean | mm_call_send_dtmf_sync ()
void | mm_call_deflect ()
gboolean | mm_call_deflect_finish ()
gboolean | mm_call_deflect_sync ()
void | mm_call_join_multiparty ()
gboolean | mm_call_join_multiparty_finish ()
gboolean | mm_call_join_multiparty_sync ()
void | mm_call_leave_multiparty ()
gboolean | mm_call_leave_multiparty_finish ()
gboolean | mm_call_leave_multiparty_sync ()

## Types and Values

struct | MMCall

## Object Hierarchy

        GObject
        ╰── GDBusProxy
            ╰── MmGdbusCallProxy
                ╰── MMCall

## Implemented Interfaces

MMCall implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusCall.

## Description

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

When the call is exposed and available in the bus, it is ensured that at least this interface is also available.

## Functions

### mm_call_get_path ()

    const gchar *
    mm_call_get_path (MMCall *self);

Gets the DBus path of the MMCall object.

#### Parameters

self | A MMCall. |

#### Returns

The DBus path of the MMCall object.

[transfer none]

Since: 1.6

### mm_call_dup_path ()

    gchar *
    mm_call_dup_path (MMCall *self);

Gets a copy of the DBus path of the MMCall object.

#### Parameters

self | A MMCall. |

#### Returns

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

[transfer full]

Since: 1.6

### mm_call_get_number ()

    const gchar *
    mm_call_get_number (MMCall *self);

Gets the call number. In outgoing calls contains the dialing number or the remote number in incoming calls

The returned value is only valid until the property changes so it is only safe to use this function on the thread where `self` was constructed. Use `mm_call_dup_number()` if on another thread.

#### Parameters

self | A MMCall. |

#### Returns

The number, or `NULL` if it couldn't be retrieved.

[transfer none]

Since: 1.6

### mm_call_dup_number ()

    gchar *
    mm_call_dup_number (MMCall *self);

Gets the call number. In outgoing calls contains the dialing number or the remote number in incoming calls

#### Parameters

self | A MMCall. |

#### Returns

The number, or `NULL` if it couldn't be retrieved. The returned value should be freed with `g_free()`.

[transfer full]

Since: 1.6

### mm_call_get_direction ()

    MMCallDirection
    mm_call_get_direction (MMCall *self);

Gets the call direction.

#### Parameters

self | A MMCall. |

#### Returns

a MMCallDirection.

Since: 1.6

### mm_call_get_state ()

    MMCallState
    mm_call_get_state (MMCall *self);

Gets the current state of call.

#### Parameters

self | A MMCall. |

#### Returns

a MMCallState.

Since: 1.6

### mm_call_get_state_reason ()

    MMCallStateReason
    mm_call_get_state_reason (MMCall *self);

Gets the reason of why the call changes its state.

#### Parameters

self | A MMCall. |

#### Returns

a MMCallStateReason.

Since: 1.6

### mm_call_get_audio_port ()

    const gchar *
    mm_call_get_audio_port (MMCall *self);

Gets the kernel device used for audio (if any).

#### Parameters

self | A MMCall. |

#### Returns

The audio port, or `NULL` if call audio is not routed via the host or couldn't be retrieved.

[transfer none]

Since: 1.10

### mm_call_dup_audio_port ()

    gchar *
    mm_call_dup_audio_port (MMCall *self);

Gets the kernel device used for audio (if any).

#### Parameters

self | A MMCall. |

#### Returns

The audio port, or `NULL` if call audio is not routed via the host or couldn't be retrieved.

[transfer full]

Since: 1.10

### mm_call_get_audio_format ()

    MMCallAudioFormat *
    mm_call_get_audio_format (MMCall *self);

Gets a MMCallAudioFormat object specifying the audio format used by the audio port if call audio is routed via the host.

The values reported by `self` are not updated when the values in the interface change. Instead, the client is expected to call `mm_call_get_audio_format()` again to get a new MMCallAudioFormat with the new values.

#### Parameters

self | A MMCall. |

#### Returns

A MMCallAudioFormat that must be freed with `g_object_unref()` or `NULL` if unknown.

[transfer full]

Since: 1.10

### mm_call_peek_audio_format ()

    MMCallAudioFormat *
    mm_call_peek_audio_format (MMCall *self);

Gets a MMCallAudioFormat object specifying the audio format used by the audio port if call audio is routed via the host.

The returned value is only valid until the property changes so it is only safe to use this function on the thread where `self` was constructed. Use `mm_call_get_audio_format()` if on another thread.

#### Parameters

self | A MMCall. |

#### Returns

A MMCallAudioFormat. Do not free the returned value, it belongs to `self` .

[transfer none]

Since: 1.10

### mm_call_get_multiparty ()

    gboolean
    mm_call_get_multiparty (MMCall *self);

Gets whether the call is part of a multiparty call.

#### Parameters

self | A MMCall. |

#### Returns

`TRUE` if the call is part of a multiparty call, `FALSE` otherwise.

Since: 1.12

### mm_call_start ()

    void
    mm_call_start (MMCall *self,
                   GCancellable *cancellable,
                   GAsyncReadyCallback callback,
                   gpointer user_data);

Asynchronously requests to queue the call.

Call objects can only be executed once.

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_call_start_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
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_call_start_finish ()

    gboolean
    mm_call_start_finish (MMCall *self,
                          GAsyncResult *res,
                          GError **error);

Finishes an operation started with `mm_call_start()`.

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_start_sync ()

    gboolean
    mm_call_start_sync (MMCall *self,
                        GCancellable *cancellable,
                        GError **error);

Synchronously requests to queue the call for delivery.

Call objects can only be sent once.

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

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_accept ()

    void
    mm_call_accept (MMCall *self,
                    GCancellable *cancellable,
                    GAsyncReadyCallback callback,
                    gpointer user_data);

Asynchronously requests to accept the incoming call.

Call objects can only be executed once.

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_call_accept_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
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_call_accept_finish ()

    gboolean
    mm_call_accept_finish (MMCall *self,
                           GAsyncResult *res,
                           GError **error);

Finishes an operation started with `mm_call_accept()`.

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_accept_sync ()

    gboolean
    mm_call_accept_sync (MMCall *self,
                         GCancellable *cancellable,
                         GError **error);

Synchronously requests to accept the incoming call.

Call objects can only be sent once.

The calling thread is blocked until an incoming call is ready. See `mm_call_accept()` for the asynchronous version of this method.

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_hangup ()

    void
    mm_call_hangup (MMCall *self,
                    GCancellable *cancellable,
                    GAsyncReadyCallback callback,
                    gpointer user_data);

Asynchronously requests to hangup the call.

Call objects can only be executed once.

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_call_hangup_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
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_call_hangup_finish ()

    gboolean
    mm_call_hangup_finish (MMCall *self,
                           GAsyncResult *res,
                           GError **error);

Finishes an operation started with `mm_call_hangup()`.

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_hangup_sync ()

    gboolean
    mm_call_hangup_sync (MMCall *self,
                         GCancellable *cancellable,
                         GError **error);

Synchronously requests to hangup the call.

Call objects can only be sent once.

The calling thread is blocked until an incoming call is ready. See `mm_call_hangup()` for the asynchronous version of this method.

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_send_dtmf ()

    void
    mm_call_send_dtmf (MMCall *self,
                       const gchar *dtmf,
                       GCancellable *cancellable,
                       GAsyncReadyCallback callback,
                       gpointer user_data);

Asynchronously requests to send a DTMF tone the call.

Call objects can only be executed once.

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_call_send_dtmf_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
dtmf | the DMTF tone. |
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_call_send_dtmf_finish ()

    gboolean
    mm_call_send_dtmf_finish (MMCall *self,
                              GAsyncResult *res,
                              GError **error);

Finishes an operation started with `mm_call_send_dtmf()`.

#### Parameters

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

#### Returns

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

Since: 1.6

### mm_call_send_dtmf_sync ()

    gboolean
    mm_call_send_dtmf_sync (MMCall *self,
                            const gchar *dtmf,
                            GCancellable *cancellable,
                            GError **error);

Synchronously requests to send a DTMF tone the call.

Call objects can only be sent once.

The calling thread is blocked until an incoming call is ready. See `mm_call_send_dtmf()` for the asynchronous version of this method.

#### Parameters

self | A MMCall. |
dtmf | the DMTF tone. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

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

Since: 1.6

### mm_call_deflect ()

    void
    mm_call_deflect (MMCall *self,
                     const gchar *number,
                     GCancellable *cancellable,
                     GAsyncReadyCallback callback,
                     gpointer user_data);

Asynchronously requests to deflect the incoming call.

This call will be considered terminated once the deflection is performed.

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_call_deflect_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
number | new number where the call will be deflected. |
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_call_deflect_finish ()

    gboolean
    mm_call_deflect_finish (MMCall *self,
                            GAsyncResult *res,
                            GError **error);

Finishes an operation started with `mm_call_deflect()`.

#### Parameters

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

#### Returns

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

Since: 1.12

### mm_call_deflect_sync ()

    gboolean
    mm_call_deflect_sync (MMCall *self,
                          const gchar *number,
                          GCancellable *cancellable,
                          GError **error);

Synchronously requests to deflect the incoming call.

This call will be considered terminated once the deflection is performed.

The calling thread is blocked until an incoming call is ready. See `mm_call_deflect()` for the asynchronous version of this method.

#### Parameters

self | A MMCall. |
number | new number where the call will be deflected. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

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

Since: 1.12

### mm_call_join_multiparty ()

    void
    mm_call_join_multiparty (MMCall *self,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

Synchronously requests to join this call into a multiparty 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_call_join_multiparty_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
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_call_join_multiparty_finish ()

    gboolean
    mm_call_join_multiparty_finish (MMCall *self,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `mm_call_join_multiparty()`.

#### Parameters

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

#### Returns

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

Since: 1.12

### mm_call_join_multiparty_sync ()

    gboolean
    mm_call_join_multiparty_sync (MMCall *self,
                                  GCancellable *cancellable,
                                  GError **error);

Synchronously requests to join this call into a multiparty call.

The calling thread is blocked until an incoming call is ready. See `mm_call_join_multiparty()` for the asynchronous version of this method.

#### Parameters

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

#### Returns

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

Since: 1.12

### mm_call_leave_multiparty ()

    void
    mm_call_leave_multiparty (MMCall *self,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

Synchronously requests to make this call private again by leaving the multiparty 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_call_leave_multiparty_finish()` to get the result of the operation.

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

#### Parameters

self | A MMCall. |
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_call_leave_multiparty_finish ()

    gboolean
    mm_call_leave_multiparty_finish (MMCall *self,
                                     GAsyncResult *res,
                                     GError **error);

Finishes an operation started with `mm_call_leave_multiparty()`.

#### Parameters

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

#### Returns

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

Since: 1.12

### mm_call_leave_multiparty_sync ()

    gboolean
    mm_call_leave_multiparty_sync (MMCall *self,
                                   GCancellable *cancellable,
                                   GError **error);

Synchronously requests to make this call private again by leaving the multiparty call.

The calling thread is blocked until an incoming call is ready. See `mm_call_leave_multiparty()` for the asynchronous version of this method.

#### Parameters

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

#### Returns

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

Since: 1.12

## Types and Values

### struct MMCall

    struct MMCall;

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