aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-common-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-03-05 10:06:45 +0100
committerAleksander Morgado <aleksander@gnu.org>2019-03-29 10:07:29 +0000
commit7330f6d5812df26c0518e04eccd3092833c6e4f3 (patch)
treee3f470c3a0b86c799ce6efe40d1be91080f9e3b6 /libmm-glib/mm-common-helpers.h
parent0a5d63872685691d43a87a27c0b700a327cf5098 (diff)
libmm-glib,common: new helper methods to read guint64 values
We use strtoull() to read a "unsigned long long" that is always at least 64bits, even in 32bit systems.
Diffstat (limited to 'libmm-glib/mm-common-helpers.h')
-rw-r--r--libmm-glib/mm-common-helpers.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/libmm-glib/mm-common-helpers.h b/libmm-glib/mm-common-helpers.h
index fce9ff25..71ef978a 100644
--- a/libmm-glib/mm-common-helpers.h
+++ b/libmm-glib/mm-common-helpers.h
@@ -146,24 +146,31 @@ gboolean mm_common_parse_key_value_string (const gchar *str,
/* Common parsers */
gboolean mm_get_int_from_str (const gchar *str,
- gint *out);
-gboolean mm_get_int_from_match_info (GMatchInfo *match_info,
- guint32 match_index,
- gint *out);
+ gint *out);
+gboolean mm_get_int_from_match_info (GMatchInfo *match_info,
+ guint32 match_index,
+ gint *out);
gboolean mm_get_uint_from_str (const gchar *str,
- guint *out);
+ guint *out);
+gboolean mm_get_u64_from_str (const gchar *str,
+ guint64 *out);
gboolean mm_get_uint_from_hex_str (const gchar *str,
guint *out);
-gboolean mm_get_uint_from_match_info (GMatchInfo *match_info,
- guint32 match_index,
- guint *out);
+gboolean mm_get_u64_from_hex_str (const gchar *str,
+ guint64 *out);
+gboolean mm_get_uint_from_match_info (GMatchInfo *match_info,
+ guint32 match_index,
+ guint *out);
+gboolean mm_get_u64_from_match_info (GMatchInfo *match_info,
+ guint32 match_index,
+ guint64 *out);
gboolean mm_get_double_from_str (const gchar *str,
- gdouble *out);
-gboolean mm_get_double_from_match_info (GMatchInfo *match_info,
- guint32 match_index,
- gdouble *out);
-gchar *mm_get_string_unquoted_from_match_info (GMatchInfo *match_info,
- guint32 match_index);
+ gdouble *out);
+gboolean mm_get_double_from_match_info (GMatchInfo *match_info,
+ guint32 match_index,
+ gdouble *out);
+gchar *mm_get_string_unquoted_from_match_info (GMatchInfo *match_info,
+ guint32 match_index);
const gchar *mm_sms_delivery_state_get_string_extended (guint delivery_state);