diff options
Diffstat (limited to 'libmm-glib/mm-sim.c')
-rw-r--r-- | libmm-glib/mm-sim.c | 209 |
1 files changed, 149 insertions, 60 deletions
diff --git a/libmm-glib/mm-sim.c b/libmm-glib/mm-sim.c index b79a3626..7246fff4 100644 --- a/libmm-glib/mm-sim.c +++ b/libmm-glib/mm-sim.c @@ -47,6 +47,8 @@ G_DEFINE_TYPE (MMSim, mm_sim, MM_GDBUS_TYPE_SIM_PROXY) * Gets the DBus path of the #MMSim object. * * Returns: (transfer none): The DBus path of the #MMSim object. + * + * Since: 1.0 */ const gchar * mm_sim_get_path (MMSim *self) @@ -63,7 +65,10 @@ mm_sim_get_path (MMSim *self) * * Gets a copy of the DBus path of the #MMSim object. * - * Returns: (transfer full): The DBus path of the #MMSim object. The returned value should be freed with g_free(). + * Returns: (transfer full): The DBus path of the #MMSim object. The returned + * value should be freed with g_free(). + * + * Since: 1.0 */ gchar * mm_sim_dup_path (MMSim *self) @@ -87,12 +92,14 @@ mm_sim_dup_path (MMSim *self) * * Gets the unique SIM identifier of the #MMSim object. * - * <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_sim_dup_identifier() if on another - * thread.</warning> + * <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_sim_dup_identifier() if on another thread.</warning> * - * Returns: (transfer none): The unique identifier of the #MMSim object, or %NULL if it couldn't be retrieved. + * Returns: (transfer none): The unique identifier of the #MMSim object, or + * %NULL if it couldn't be retrieved. + * + * Since: 1.0 */ const gchar * mm_sim_get_identifier (MMSim *self) @@ -109,7 +116,11 @@ mm_sim_get_identifier (MMSim *self) * * Gets a copy of the unique SIM identifier of the #MMSim object. * - * Returns: (transfer full): The unique identifier of the #MMSim object, or %NULL if it couldn't be retrieved. The returned value should be freed with g_free(). + * Returns: (transfer full): The unique identifier of the #MMSim object, or + * %NULL if it couldn't be retrieved. The returned value should be freed with + * g_free(). + * + * Since: 1.0 */ gchar * mm_sim_dup_identifier (MMSim *self) @@ -126,14 +137,17 @@ mm_sim_dup_identifier (MMSim *self) * mm_sim_get_imsi: * @self: A #MMSim. * - * Gets the International Mobile Subscriber Identity (IMSI) of the #MMSim object. + * Gets the International Mobile Subscriber Identity (IMSI) of the #MMSim + * object. * - * <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_sim_dup_imsi() if on another - * thread.</warning> + * <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_sim_dup_imsi() if on another thread.</warning> * - * Returns: (transfer none): The IMSI of the #MMSim object, or %NULL if it couldn't be retrieved. + * Returns: (transfer none): The IMSI of the #MMSim object, or %NULL if it + * couldn't be retrieved. + * + * Since: 1.0 */ const gchar * mm_sim_get_imsi (MMSim *self) @@ -148,9 +162,13 @@ mm_sim_get_imsi (MMSim *self) * mm_sim_dup_imsi: * @self: A #MMSim. * - * Gets a copy of the International Mobile Subscriber Identity (IMSI) of the #MMSim object. + * Gets a copy of the International Mobile Subscriber Identity (IMSI) of the + * #MMSim object. + * + * Returns: (transfer full): The IMSI of the #MMSim object, or %NULL if it + * couldn't be retrieved. The returned value should be freed with g_free(). * - * Returns: (transfer full): The IMSI of the #MMSim object, or %NULL if it couldn't be retrieved. The returned value should be freed with g_free(). + * Since: 1.0 */ gchar * mm_sim_dup_imsi (MMSim *self) @@ -169,12 +187,14 @@ mm_sim_dup_imsi (MMSim *self) * * Gets the Operator Identifier of the #MMSim object. * - * <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_sim_dup_operator_identifier() if on another - * thread.</warning> + * <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_sim_dup_operator_identifier() if on another thread.</warning> + * + * Returns: (transfer none): The Operator Identifier of the #MMSim object, or + * %NULL if it couldn't be retrieved. * - * Returns: (transfer none): The Operator Identifier of the #MMSim object, or %NULL if it couldn't be retrieved. + * Since: 1.0 */ const gchar * mm_sim_get_operator_identifier (MMSim *self) @@ -191,7 +211,11 @@ mm_sim_get_operator_identifier (MMSim *self) * * Gets a copy of the Operator Identifier of the #MMSim object. * - * Returns: (transfer full): The Operator Identifier of the #MMSim object, or %NULL if it couldn't be retrieved. The returned value should be freed with g_free(). + * Returns: (transfer full): The Operator Identifier of the #MMSim object, or + * %NULL if it couldn't be retrieved. The returned value should be freed with + * g_free(). + * + * Since: 1.0 */ gchar * mm_sim_dup_operator_identifier (MMSim *self) @@ -210,12 +234,14 @@ mm_sim_dup_operator_identifier (MMSim *self) * * Gets the Operator Name of the #MMSim object. * - * <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_sim_dup_operator_name() if on another - * thread.</warning> + * <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_sim_dup_operator_name() if on another thread.</warning> + * + * Returns: (transfer none): The Operator Name of the #MMSim object, or %NULL if + * it couldn't be retrieved. * - * Returns: (transfer none): The Operator Name of the #MMSim object, or %NULL if it couldn't be retrieved. + * Since: 1.0 */ const gchar * mm_sim_get_operator_name (MMSim *self) @@ -232,7 +258,10 @@ mm_sim_get_operator_name (MMSim *self) * * Gets a copy of the Operator Name of the #MMSim object. * - * Returns: (transfer full): The Operator Name of the #MMSim object, or %NULL if it couldn't be retrieved. The returned value should be freed with g_free(). + * Returns: (transfer full): The Operator Name of the #MMSim object, or %NULL if + * it couldn't be retrieved. The returned value should be freed with g_free(). + * + * Since: 1.0 */ gchar * mm_sim_dup_operator_name (MMSim *self) @@ -251,12 +280,14 @@ mm_sim_dup_operator_name (MMSim *self) * * Gets the list of emergency call numbers programmed in the SIM card. * - * <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_sim_dup_emergency_numbers() if on another - * thread.</warning> + * <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_sim_dup_emergency_numbers() if on another thread.</warning> + * + * Returns: (transfer none): The emergency numbers, or %NULL if none available. + * Do not free the returned value, it belongs to @self. * - * Returns: (transfer none): The emergency numbers, or %NULL if none available. Do not free the returned value, it belongs to @self. + * Since: 1.12 */ const gchar * const * mm_sim_get_emergency_numbers (MMSim *self) @@ -272,7 +303,10 @@ mm_sim_get_emergency_numbers (MMSim *self) * * Gets a copy of the list of emergency call numbers programmed in the SIM card. * - * Returns: (transfer full): The emergency numbers, or %NULL if none available. The returned value should be freed with g_strfreev(). + * Returns: (transfer full): The emergency numbers, or %NULL if none available. + * The returned value should be freed with g_strfreev(). + * + * Since: 1.12 */ gchar ** mm_sim_dup_emergency_numbers (MMSim *self) @@ -287,12 +321,15 @@ mm_sim_dup_emergency_numbers (MMSim *self) /** * mm_sim_send_pin_finish: * @self: A #MMSim. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to mm_sim_send_pin(). + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * mm_sim_send_pin(). * @error: Return location for error or %NULL. * * Finishes an operation started with mm_sim_send_pin(). * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_send_pin_finish (MMSim *self, @@ -309,15 +346,21 @@ mm_sim_send_pin_finish (MMSim *self, * @self: A #MMSim. * @pin: The PIN code. * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or + * %NULL. * @user_data: User data to pass to @callback. * * Asynchronously sends the PIN code to the SIM card. * - * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. - * You can then call mm_sim_send_pin_finish() to get the result of the operation. + * When the operation is finished, @callback will be invoked in the + * <link linkend="g-main-context-push-thread-default">thread-default main loop</link> + * of the thread you are calling this method from. You can then call + * mm_sim_send_pin_finish() to get the result of the operation. + * + * See mm_sim_send_pin_sync() for the synchronous, blocking version of this + * method. * - * See mm_sim_send_pin_sync() for the synchronous, blocking version of this method. + * Since: 1.0 */ void mm_sim_send_pin (MMSim *self, @@ -344,10 +387,12 @@ mm_sim_send_pin (MMSim *self, * * Synchronously sends the PIN to the SIM card. * - * The calling thread is blocked until a reply is received. - * See mm_sim_send_pin() for the asynchronous version of this method. + * The calling thread is blocked until a reply is received. See + * mm_sim_send_pin() for the asynchronous version of this method. * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_send_pin_sync (MMSim *self, @@ -368,12 +413,15 @@ mm_sim_send_pin_sync (MMSim *self, /** * mm_sim_send_puk_finish: * @self: A #MMSim. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to mm_sim_send_puk(). + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * mm_sim_send_puk(). * @error: Return location for error or %NULL. * * Finishes an operation started with mm_sim_send_puk(). * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_send_puk_finish (MMSim *self, @@ -391,15 +439,21 @@ mm_sim_send_puk_finish (MMSim *self, * @puk: The PUK code. * @pin: The PIN code. * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or + * %NULL. * @user_data: User data to pass to @callback. * * Asynchronously sends the PUK code to the SIM card. * - * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. - * You can then call mm_sim_send_puk_finish() to get the result of the operation. + * When the operation is finished, @callback will be invoked in the + * <link linkend="g-main-context-push-thread-default">thread-default main loop</link> + * of the thread you are calling this method from. You can then call + * mm_sim_send_puk_finish() to get the result of the operation. + * + * See mm_sim_send_puk_sync() for the synchronous, blocking version of this + * method. * - * See mm_sim_send_puk_sync() for the synchronous, blocking version of this method. + * Since: 1.0 */ void mm_sim_send_puk (MMSim *self, @@ -433,6 +487,8 @@ mm_sim_send_puk (MMSim *self, * See mm_sim_send_puk() for the asynchronous version of this method. * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_send_puk_sync (MMSim *self, @@ -455,12 +511,15 @@ mm_sim_send_puk_sync (MMSim *self, /** * mm_sim_enable_pin_finish: * @self: A #MMSim. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to mm_sim_enable_pin(). + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * mm_sim_enable_pin(). * @error: Return location for error or %NULL. * * Finishes an operation started with mm_sim_enable_pin(). * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_enable_pin_finish (MMSim *self, @@ -477,15 +536,21 @@ mm_sim_enable_pin_finish (MMSim *self, * @self: A #MMSim. * @pin: The PIN code. * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or + * %NULL. * @user_data: User data to pass to @callback. * * Asynchronously enables requesting the PIN code in the SIM card. * - * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. - * You can then call mm_sim_enable_pin_finish() to get the result of the operation. + * When the operation is finished, @callback will be invoked in the + * <link linkend="g-main-context-push-thread-default">thread-default main loop</link> + * of the thread you are calling this method from. You can then call + * mm_sim_enable_pin_finish() to get the result of the operation. + * + * See mm_sim_enable_pin_sync() for the synchronous, blocking version of this + * method. * - * See mm_sim_enable_pin_sync() for the synchronous, blocking version of this method. + * Since: 1.0 */ void mm_sim_enable_pin (MMSim *self, @@ -517,6 +582,8 @@ mm_sim_enable_pin (MMSim *self, * See mm_sim_enable_pin() for the asynchronous version of this method. * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_enable_pin_sync (MMSim *self, @@ -538,12 +605,15 @@ mm_sim_enable_pin_sync (MMSim *self, /** * mm_sim_disable_pin_finish: * @self: A #MMSim. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to mm_sim_disable_pin(). + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * mm_sim_disable_pin(). * @error: Return location for error or %NULL. * * Finishes an operation started with mm_sim_disable_pin(). * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_disable_pin_finish (MMSim *self, @@ -560,15 +630,21 @@ mm_sim_disable_pin_finish (MMSim *self, * @self: A #MMSim. * @pin: The PIN code. * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or + * %NULL. * @user_data: User data to pass to @callback. * * Asynchronously disables requesting the PIN code in the SIM card. * - * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. - * You can then call mm_sim_disable_pin_finish() to get the result of the operation. + * When the operation is finished, @callback will be invoked in the + * <link linkend="g-main-context-push-thread-default">thread-default main loop</link> + * of the thread you are calling this method from. You can then call + * mm_sim_disable_pin_finish() to get the result of the operation. * - * See mm_sim_disable_pin_sync() for the synchronous, blocking version of this method. + * See mm_sim_disable_pin_sync() for the synchronous, blocking version of this + * method. + * + * Since: 1.0 */ void mm_sim_disable_pin (MMSim *self, @@ -600,6 +676,8 @@ mm_sim_disable_pin (MMSim *self, * See mm_sim_disable_pin() for the asynchronous version of this method. * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_disable_pin_sync (MMSim *self, @@ -621,12 +699,15 @@ mm_sim_disable_pin_sync (MMSim *self, /** * mm_sim_change_pin_finish: * @self: A #MMSim. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to mm_sim_change_pin(). + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * mm_sim_change_pin(). * @error: Return location for error or %NULL. * * Finishes an operation started with mm_sim_change_pin(). * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_change_pin_finish (MMSim *self, @@ -644,15 +725,21 @@ mm_sim_change_pin_finish (MMSim *self, * @old_pin: The current PIN code. * @new_pin: The new PIN code to be set. * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or + * %NULL. * @user_data: User data to pass to @callback. * * Asynchronously changes the PIN code in the SIM card. * - * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. - * You can then call mm_sim_change_pin_finish() to get the result of the operation. + * When the operation is finished, @callback will be invoked in the + * <link linkend="g-main-context-push-thread-default">thread-default main loop</link> + * of the thread you are calling this method from. You can then call + * mm_sim_change_pin_finish() to get the result of the operation. + * + * See mm_sim_change_pin_sync() for the synchronous, blocking version of this + * method. * - * See mm_sim_change_pin_sync() for the synchronous, blocking version of this method. + * Since: 1.0 */ void mm_sim_change_pin (MMSim *self, @@ -686,6 +773,8 @@ mm_sim_change_pin (MMSim *self, * See mm_sim_change_pin() for the asynchronous version of this method. * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + * + * Since: 1.0 */ gboolean mm_sim_change_pin_sync (MMSim *self, |