aboutsummaryrefslogtreecommitdiff
path: root/src/mm-at-serial-port.h
diff options
context:
space:
mode:
authorNathan Williams <njw@chromium.org>2012-03-23 14:05:40 -0400
committerAleksander Morgado <aleksander@lanedo.com>2012-05-02 21:05:06 +0200
commit00cb8a26a829bd26ea7f1d953ebdbe657e85f83c (patch)
tree9e5237e78a096f8cd1f8d555a585509a12daf23a /src/mm-at-serial-port.h
parent67698b43c4c088fbd319de6f14914e958a0888d8 (diff)
Add a utility routine to do ITU V.250 quoting of strings for AT commands.
BUG=chromium-os:27096,chromium-os:27063 TEST=None Change-Id: Ic1d24a9e4b7421db7f8d16c52535bd6d2780423e
Diffstat (limited to 'src/mm-at-serial-port.h')
-rw-r--r--src/mm-at-serial-port.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-at-serial-port.h b/src/mm-at-serial-port.h
index 02435123..8ed8db9d 100644
--- a/src/mm-at-serial-port.h
+++ b/src/mm-at-serial-port.h
@@ -104,6 +104,12 @@ void mm_at_serial_port_queue_command_cached (MMAtSerialPort *self,
MMAtSerialResponseFn callback,
gpointer user_data);
+/*
+ * Convert a string into a quoted and escaped string. Returns a new
+ * allocated string. Follows ITU V.250 5.4.2.2 "String constants".
+ */
+gchar *mm_at_serial_port_quote_string (const char *string);
+
/* Just for unit tests */
void mm_at_serial_port_remove_echo (GByteArray *response);