diff options
author | Eric Caruso <ejcaruso@chromium.org> | 2020-10-16 12:28:10 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-10-19 20:38:43 +0000 |
commit | 61739ab934e46c9693e964a20aced349e0f02d51 (patch) | |
tree | 812e77b35f6d566e574786edca99c7831ae1fd3e /libmm-glib/mm-sim.c | |
parent | e24a8240cb957c1875f2f3eab14aa5005c3b8f40 (diff) |
libmm-glib,mmcli: add mm_sim_get_eid and add EID to mmcli output
This exposes the new EID property of the SIM object on mmcli.
Diffstat (limited to 'libmm-glib/mm-sim.c')
-rw-r--r-- | libmm-glib/mm-sim.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libmm-glib/mm-sim.c b/libmm-glib/mm-sim.c index d59f7990..0a3b6071 100644 --- a/libmm-glib/mm-sim.c +++ b/libmm-glib/mm-sim.c @@ -202,6 +202,52 @@ mm_sim_dup_imsi (MMSim *self) /*****************************************************************************/ /** + * mm_sim_get_eid: + * @self: A #MMSim. + * + * Gets the Embedded UICC ID (or EID) 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_eid() if on another thread.</warning> + * + * Returns: (transfer none): The EID of the #MMSim object, or %NULL if it + * couldn't be retrieved. + * + * Since: 1.16 + */ +const gchar * +mm_sim_get_eid (MMSim *self) +{ + g_return_val_if_fail (MM_IS_SIM (self), NULL); + + RETURN_NON_EMPTY_CONSTANT_STRING ( + mm_gdbus_sim_get_eid (MM_GDBUS_SIM (self))); +} + +/** + * mm_sim_dup_eid: + * @self: A #MMSim. + * + * Gets a copy of the Embedded UICC ID (EID) of the #MMSim object. + * + * Returns: (transfer full): The EID of the #MMSim object, or %NULL if it + * couldn't be retrieved. The returned value should be freed with g_free(). + * + * Since: 1.16 + */ +gchar * +mm_sim_dup_eid (MMSim *self) +{ + g_return_val_if_fail (MM_IS_SIM (self), NULL); + + RETURN_NON_EMPTY_STRING ( + mm_gdbus_sim_dup_eid (MM_GDBUS_SIM (self))); +} + +/*****************************************************************************/ + +/** * mm_sim_get_operator_identifier: * @self: A #MMSim. * |