## MMModemSar

MMModemSar — The SAR interface

## Functions

const gchar * | mm_modem_sar_get_path ()
gchar * | mm_modem_sar_dup_path ()
void | mm_modem_sar_enable ()
gboolean | mm_modem_sar_enable_finish ()
gboolean | mm_modem_sar_enable_sync ()
void | mm_modem_sar_set_power_level ()
gboolean | mm_modem_sar_set_power_level_finish ()
gboolean | mm_modem_sar_set_power_level_sync ()
gboolean | mm_modem_sar_get_state ()
guint | mm_modem_sar_get_power_level ()

## Types and Values

struct | MMModemSar

## Object Hierarchy

        GObject
        ╰── GDBusProxy
            ╰── MmGdbusModemSarProxy
                ╰── MMModemSar

## Implemented Interfaces

MMModemSar implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemSar.

## Description

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

The SAR interface is exposed whenever a modem has SAR capabilities.

## Functions

### mm_modem_sar_get_path ()

    const gchar *
    mm_modem_sar_get_path (MMModemSar *self);

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

#### Parameters

self | A MMModemSar. |

#### Returns

The DBus path of the MMObject object.

[transfer none]

Since: 1.20

### mm_modem_sar_dup_path ()

    gchar *
    mm_modem_sar_dup_path (MMModemSar *self);

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

#### Parameters

self | A MMModemSar. |

#### Returns

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

[transfer full]

Since: 1.20

### mm_modem_sar_enable ()

    void
    mm_modem_sar_enable (MMModemSar *self,
                         gboolean enable,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

Asynchronously enable or disable dynamic SAR.

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

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

#### Parameters

self | A MMModemSar. |
enable | `TRUE` to enable dynamic SAR and `FALSE` to disable it. |
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.20

### mm_modem_sar_enable_finish ()

    gboolean
    mm_modem_sar_enable_finish (MMModemSar *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with `mm_modem_sar_enable()`.

#### Parameters

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

#### Returns

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

Since: 1.20

### mm_modem_sar_enable_sync ()

    gboolean
    mm_modem_sar_enable_sync (MMModemSar *self,
                              gboolean enable,
                              GCancellable *cancellable,
                              GError **error);

Synchronously enable or disable dynamic SAR.

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

#### Parameters

self | A MMModemSar. |
enable | `TRUE` to enable dynamic SAR and `FALSE` to disable it. |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

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

Since: 1.20

### mm_modem_sar_set_power_level ()

    void
    mm_modem_sar_set_power_level (MMModemSar *self,
                                  guint level,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously set current dynamic SAR power level.

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

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

#### Parameters

self | A MMModemSar. |
level | Index of the SAR power level mapping table |
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.20

### mm_modem_sar_set_power_level_finish ()

    gboolean
    mm_modem_sar_set_power_level_finish (MMModemSar *self,
                                         GAsyncResult *res,
                                         GError **error);

### mm_modem_sar_set_power_level_sync ()

    gboolean
    mm_modem_sar_set_power_level_sync (MMModemSar *self,
                                       guint level,
                                       GCancellable *cancellable,
                                       GError **error);

Synchronously set current dynamic SAR power level.

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

#### Parameters

self | A MMModemSar. |
level | Index of the SAR power level mapping table |
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if set power level was successful, `FALSE` if `error` is set.

Since: 1.20

### mm_modem_sar_get_state ()

    gboolean
    mm_modem_sar_get_state (MMModemSar *self);

Gets the state of dynamic SAR.

#### Parameters

self | A MMModem. |

#### Returns

`TRUE` if dynamic SAR is enabled, `FALSE` otherwise.

Since: 1.20

### mm_modem_sar_get_power_level ()

    guint
    mm_modem_sar_get_power_level (MMModemSar *self);

Gets the index of the SAR power level mapping table.

#### Parameters

self | A MMModem. |

#### Returns

the index.

Since: 1.20

## Types and Values

### struct MMModemSar

    struct MMModemSar;

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