MMManager

MMManager — The Manager object

Functions

Types and Values

struct MMManager

Object Hierarchy

    GObject
    ╰── GDBusObjectManagerClient
        ╰── MmGdbusObjectManagerClient
            ╰── MMManager

Implemented Interfaces

MMManager implements GInitable, GAsyncInitable and GDBusObjectManager.

Description

The MMManager is the object allowing access to the Manager interface.

This object is also a GDBusObjectManagerClient, and therefore it allows to use the standard ObjectManager interface to list and handle the managed modem objects.

Functions

mm_manager_peek_proxy ()

GDBusProxy *
mm_manager_peek_proxy (MMManager *manager);

Gets the GDBusProxy interface of the manager .

Parameters

manager

A MMManager.

 

Returns

The GDBusProxy interface of manager , or NULL if none. Do not free the returned object, it is owned by manager .

[transfer none]


mm_manager_get_proxy ()

GDBusProxy *
mm_manager_get_proxy (MMManager *manager);

Gets the GDBusProxy interface of the manager .

Parameters

manager

A MMManager.

 

Returns

The GDBusProxy interface of manager , or NULL if none. The returned object must be freed with g_object_unref().

[transfer full]


mm_manager_new ()

void
mm_manager_new (GDBusConnection *connection,
                GDBusObjectManagerClientFlags flags,
                GCancellable *cancellable,
                GAsyncReadyCallback callback,
                gpointer user_data);

Asynchronously creates a MMManager.

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

See mm_manager_new_sync() for the synchronous, blocking version of this constructor.

Parameters

connection

A GDBusConnection.

 

flags

Flags from the GDBusObjectManagerClientFlags enumeration.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

User data to pass to callback .

 

mm_manager_new_finish ()

MMManager *
mm_manager_new_finish (GAsyncResult *res,
                       GError **error);

Finishes an operation started with mm_manager_new().

Parameters

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_manager_new().

 

error

Return location for error or NULL

 

Returns

The constructed object manager client or NULL if error is set.

[transfer full][type MMManager]


mm_manager_new_sync ()

MMManager *
mm_manager_new_sync (GDBusConnection *connection,
                     GDBusObjectManagerClientFlags flags,
                     GCancellable *cancellable,
                     GError **error);

Synchronously creates a MMManager.

The calling thread is blocked until a reply is received.

See mm_manager_new() for the asynchronous version of this constructor.

Parameters

connection

A GDBusConnection.

 

flags

Flags from the GDBusObjectManagerClientFlags enumeration.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL

 

Returns

The constructed object manager client or NULL if error is set.

[transfer full][type MMManager]


mm_manager_get_version ()

const gchar *
mm_manager_get_version (MMManager *manager);

Gets the ModemManager version, as reported by the daemon.

It is safe to assume this value never changes during runtime.

Parameters

manager

A MMManager.

 

Returns

The version, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]


mm_manager_scan_devices ()

void
mm_manager_scan_devices (MMManager *manager,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

Asynchronously requests to scan looking for devices.

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

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

Parameters

manager

A MMManager.

 

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

gboolean
mm_manager_scan_devices_finish (MMManager *manager,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_manager_scan_devices().

Parameters

manager

A MMManager.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_manager_scan_devices().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_scan_devices_sync ()

gboolean
mm_manager_scan_devices_sync (MMManager *manager,
                              GCancellable *cancellable,
                              GError **error);

Synchronously requests to scan looking for devices.

The calling thread is blocked until a reply is received.

See mm_manager_scan_devices() for the asynchronous version of this method.

Parameters

manager

A MMManager.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_inhibit_device ()

void
mm_manager_inhibit_device (MMManager *manager,
                           const gchar *uid,
                           GCancellable *cancellable,
                           GAsyncReadyCallback callback,
                           gpointer user_data);

Asynchronously requests to add an inhibition on the device identified by uid .

The uid must be the unique ID retrieved from an existing MMModem using mm_modem_get_device(). The caller should keep track of this uid and use it in the mm_manager_uninhibit_device() call when the inhibition is no longer required.

The inhibition added with this method may also be automatically removed when the caller program disappears from the bus (e.g. if the program ends before having called mm_manager_uninhibit_device() explicitly).

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

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

Parameters

manager

A MMManager.

 

uid

the unique ID of the physical device.

 

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

gboolean
mm_manager_inhibit_device_finish (MMManager *manager,
                                  GAsyncResult *res,
                                  GError **error);

Finishes an operation started with mm_manager_inhibit_device().

Parameters

manager

A MMManager.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_manager_inhibit_device().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_inhibit_device_sync ()

gboolean
mm_manager_inhibit_device_sync (MMManager *manager,
                                const gchar *uid,
                                GCancellable *cancellable,
                                GError **error);

Synchronously requests to add an inhibition on the device identified by uid .

The uid must be the unique ID retrieved from an existing MMModem using mm_modem_get_device(). The caller should keep track of this uid and use it in the mm_manager_uninhibit_device_sync() call when the inhibition is no longer required.

The inhibition added with this method may also be automatically removed when the caller program disappears from the bus (e.g. if the program ends before having called mm_manager_uninhibit_device_sync() explicitly).

See mm_manager_inhibit_device() for the asynchronous version of this method.

Parameters

manager

A MMManager.

 

uid

the unique ID of the physical device.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_uninhibit_device ()

void
mm_manager_uninhibit_device (MMManager *manager,
                             const gchar *uid,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

Asynchronously requests to remove an inhibition on the device identified by uid .

The uid must be the same unique ID that was sent in the inhibition request.

Only the same program that placed an inhibition on a given device is able to remove the inhibition.

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

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

Parameters

manager

A MMManager.

 

uid

the unique ID of the physical device.

 

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

gboolean
mm_manager_uninhibit_device_finish (MMManager *manager,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with mm_manager_uninhibit_device().

Parameters

manager

A MMManager.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_manager_uninhibit_device().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_uninhibit_device_sync ()

gboolean
mm_manager_uninhibit_device_sync (MMManager *manager,
                                  const gchar *uid,
                                  GCancellable *cancellable,
                                  GError **error);

Synchronously requests to remove an inhibition on the device identified by uid .

The uid must be the same unique ID that was sent in the inhibition request.

Only the same program that placed an inhibition on a given device is able to remove the inhibition.

See mm_manager_uninhibit_device() for the asynchronous version of this method.

Parameters

manager

A MMManager.

 

uid

the unique ID of the physical device.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_set_logging ()

void
mm_manager_set_logging (MMManager *manager,
                        const gchar *level,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Asynchronously requests to set the specified logging level in the daemon.

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

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

Parameters

manager

A MMManager.

 

level

the login level to set.

 

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

gboolean
mm_manager_set_logging_finish (MMManager *manager,
                               GAsyncResult *res,
                               GError **error);

Finishes an operation started with mm_manager_set_logging().

Parameters

manager

A MMManager.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_manager_set_logging().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_set_logging_sync ()

gboolean
mm_manager_set_logging_sync (MMManager *manager,
                             const gchar *level,
                             GCancellable *cancellable,
                             GError **error);

Synchronously requests to set the specified logging level in the daemon..

The calling thread is blocked until a reply is received.

See mm_manager_set_logging() for the asynchronous version of this method.

Parameters

manager

A MMManager.

 

level

the login level to set.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.


mm_manager_report_kernel_event ()

void
mm_manager_report_kernel_event (MMManager *manager,
                                MMKernelEventProperties *properties,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously report kernel event.

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

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

Parameters

manager

A MMManager.

 

properties

the properties of the kernel event.

 

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

gboolean
mm_manager_report_kernel_event_finish (MMManager *manager,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an operation started with mm_manager_report_kernel_event().

Parameters

manager

A MMManager.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_manager_report_kernel_event().

 

error

Return location for error or NULL.

 

Returns

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


mm_manager_report_kernel_event_sync ()

gboolean
mm_manager_report_kernel_event_sync (MMManager *manager,
                                     MMKernelEventProperties *properties,
                                     GCancellable *cancellable,
                                     GError **error);

Synchronously report kernel event.

The calling thread is blocked until a reply is received.

See mm_manager_report_kernel_event() for the asynchronous version of this method.

Parameters

manager

A MMManager.

 

properties

the properties of the kernel event.

 

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.

Types and Values

struct MMManager

struct MMManager;

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