MMCall

MMCall — The call interface

Synopsis

struct              MMCall;

const gchar *       mm_call_get_path                    (MMCall *self);
gchar *             mm_call_dup_path                    (MMCall *self);
const gchar *       mm_call_get_number                  (MMCall *self);
gchar *             mm_call_dup_number                  (MMCall *self);
MMCallDirection     mm_call_get_direction               (MMCall *self);
MMCallState         mm_call_get_state                   (MMCall *self);
MMCallStateReason   mm_call_get_state_reason            (MMCall *self);

void                mm_call_start                       (MMCall *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_call_start_finish                (MMCall *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_call_start_sync                  (MMCall *self,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_call_accept                      (MMCall *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_call_accept_finish               (MMCall *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_call_accept_sync                 (MMCall *self,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_call_hangup                      (MMCall *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_call_hangup_finish               (MMCall *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_call_hangup_sync                 (MMCall *self,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_call_send_dtmf                   (MMCall *self,
                                                         const gchar *dtmf,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_call_send_dtmf_finish            (MMCall *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_call_send_dtmf_sync              (MMCall *self,
                                                         const gchar *dtmf,
                                                         GCancellable *cancellable,
                                                         GError **error);

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.

Details

struct MMCall

struct MMCall;

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


mm_call_get_path ()

const gchar *       mm_call_get_path                    (MMCall *self);

Gets the DBus path of the MMCall object.

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.

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

Warning

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.

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

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.

self :

A MMCall.

Returns :

a MMCallDirection.

mm_call_get_state ()

MMCallState         mm_call_get_state                   (MMCall *self);

Gets the current state of call.

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.

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.

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

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.

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.

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

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.

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.

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

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.

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.

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

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.

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.