aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmm-glib/mm-sim.c')
-rw-r--r--libmm-glib/mm-sim.c46
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.
*