diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-09 12:58:14 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-09 15:23:48 +0200 |
commit | 386fdf3f802ab5c61f752272d8dfd57b970cca01 (patch) | |
tree | 5768d9aa50f5b2388c4f049e0759c1585f8ab9d3 | |
parent | ff10acc860a7f1c77cf0fe4d1a142b868e0619e4 (diff) | |
download | external_libqmi-386fdf3f802ab5c61f752272d8dfd57b970cca01.zip external_libqmi-386fdf3f802ab5c61f752272d8dfd57b970cca01.tar.gz external_libqmi-386fdf3f802ab5c61f752272d8dfd57b970cca01.tar.bz2 |
libqmi-glib,utils: make qmi_utils_str_hex() private to the library
-rw-r--r-- | build-aux/qmi-codegen/Message.py | 2 | ||||
-rw-r--r-- | docs/reference/libqmi-glib/libqmi-glib-common.sections | 1 | ||||
-rw-r--r-- | libqmi-glib/qmi-message.c | 2 | ||||
-rw-r--r-- | libqmi-glib/qmi-utils.c | 10 | ||||
-rw-r--r-- | libqmi-glib/qmi-utils.h | 13 |
5 files changed, 16 insertions, 12 deletions
diff --git a/build-aux/qmi-codegen/Message.py b/build-aux/qmi-codegen/Message.py index 3eaff1c..57b33ef 100644 --- a/build-aux/qmi-codegen/Message.py +++ b/build-aux/qmi-codegen/Message.py @@ -320,7 +320,7 @@ class Message: ' } else {\n' ' gchar *value_hex;\n' '\n' - ' value_hex = qmi_utils_str_hex (value, length, \':\');\n' + ' value_hex = __qmi_utils_str_hex (value, length, \':\');\n' ' g_string_append_printf (ctx->printable,\n' ' "%sTLV:\\n"\n' ' "%s type = \\"%s\\" (0x%02x)\\n"\n' diff --git a/docs/reference/libqmi-glib/libqmi-glib-common.sections b/docs/reference/libqmi-glib/libqmi-glib-common.sections index 80edb76..96bf74a 100644 --- a/docs/reference/libqmi-glib/libqmi-glib-common.sections +++ b/docs/reference/libqmi-glib/libqmi-glib-common.sections @@ -641,7 +641,6 @@ qmi_message_get_tlv_printable <SECTION> <FILE>qmi-utils</FILE> -qmi_utils_str_hex qmi_utils_read_guint8_from_buffer qmi_utils_read_gint8_from_buffer qmi_utils_read_guint16_from_buffer diff --git a/libqmi-glib/qmi-message.c b/libqmi-glib/qmi-message.c index 3227820..2c2394e 100644 --- a/libqmi-glib/qmi-message.c +++ b/libqmi-glib/qmi-message.c @@ -740,7 +740,7 @@ qmi_message_get_tlv_printable (QmiMessage *self, g_return_val_if_fail (raw != NULL, NULL); g_return_val_if_fail (raw_length > 0, NULL); - value_hex = qmi_utils_str_hex (raw, raw_length, ':'); + value_hex = __qmi_utils_str_hex (raw, raw_length, ':'); printable = g_strdup_printf ("%sTLV:\n" "%s type = 0x%02x\n" "%s length = %" G_GSIZE_FORMAT "\n" diff --git a/libqmi-glib/qmi-utils.c b/libqmi-glib/qmi-utils.c index 2273aad..0f93d07 100644 --- a/libqmi-glib/qmi-utils.c +++ b/libqmi-glib/qmi-utils.c @@ -29,9 +29,9 @@ #include "qmi-utils.h" gchar * -qmi_utils_str_hex (gconstpointer mem, - gsize size, - gchar delimiter) +__qmi_utils_str_hex (gconstpointer mem, + gsize size, + gchar delimiter) { const guint8 *data = mem; gsize i; @@ -72,8 +72,8 @@ print_read_bytes_trace (const gchar *type, gchar *str1; gchar *str2; - str1 = qmi_utils_str_hex (buffer, n_bytes, ':'); - str2 = qmi_utils_str_hex (out, n_bytes, ':'); + str1 = __qmi_utils_str_hex (buffer, n_bytes, ':'); + str2 = __qmi_utils_str_hex (out, n_bytes, ':'); g_debug ("Read %s (%s) --> (%s)", type, str1, str2); g_warn_if_fail (g_str_equal (str1, str2)); diff --git a/libqmi-glib/qmi-utils.h b/libqmi-glib/qmi-utils.h index dc2d654..372ebcb 100644 --- a/libqmi-glib/qmi-utils.h +++ b/libqmi-glib/qmi-utils.h @@ -32,10 +32,6 @@ G_BEGIN_DECLS -gchar *qmi_utils_str_hex (gconstpointer mem, - gsize size, - gchar delimiter); - /* Reading/Writing integer variables */ void qmi_utils_read_guint8_from_buffer (const guint8 **buffer, @@ -125,6 +121,15 @@ void qmi_utils_write_fixed_size_string_to_buffer (guint8 **buffer, guint16 fixed_size, const gchar *in); +/* Other private methods */ + +#if defined (LIBQMI_GLIB_COMPILATION) +G_GNUC_INTERNAL +gchar *__qmi_utils_str_hex (gconstpointer mem, + gsize size, + gchar delimiter); +#endif + G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_UTILS_H_ */ |