## 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 ()
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 ()

## 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]

### 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]

### 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]

### 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]

### mm_call_get_direction ()

    MMCallDirection
    mm_call_get_direction (MMCall *self);

Gets the call direction.

#### Parameters

self | A MMCall. |

#### Returns

a MMCallDirection.

### mm_call_get_state ()

    MMCallState
    mm_call_get_state (MMCall *self);

Gets the current state of call.

#### Parameters

self | A MMCall. |

#### Returns

a MMCallState.

### 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.

### 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` . |

### 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 succeded, `FALSE` if `error` is set.

### 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 succeded, `FALSE` if `error` is set.

### 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` . |

### 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 succeded, `FALSE` if `error` is set.

### 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 succeded, `FALSE` if `error` is set.

### 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` . |

### 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 succeded, `FALSE` if `error` is set.

### 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 succeded, `FALSE` if `error` is set.

### 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` . |

### 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 succeded, `FALSE` if `error` is set.

### 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 succeded, `FALSE` if `error` is set.

## Types and Values

### struct MMCall

    struct MMCall;

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