diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-03-30 14:35:29 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-03-30 14:35:29 -0500 |
commit | 882b62b640b35d8dc91f62a26cea26540c16fe0c (patch) | |
tree | d55bd527062c643a9a49de81f3a486a4a36cd324 /gatchat | |
parent | cdc13c40b6fb16ddfe827441d5641a5252f41025 (diff) | |
download | ofono-882b62b640b35d8dc91f62a26cea26540c16fe0c.tar.bz2 |
Refactor: Add a single-line response function
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gatserver.c | 7 | ||||
-rw-r--r-- | gatchat/gatserver.h | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 4d6c5d99..d01895d3 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -210,7 +210,12 @@ void g_at_server_send_unsolicited(GAtServer *server, const char *result) send_result_common(server, result); } -void g_at_server_send_info_text(GAtServer *server, GSList *text) +void g_at_server_send_info(GAtServer *server, const char *info) +{ + send_result_common(server, info); +} + +void g_at_server_send_info_lines(GAtServer *server, GSList *text) { char buf[MAX_TEXT_SIZE]; char t = server->v250.s3; diff --git a/gatchat/gatserver.h b/gatchat/gatserver.h index a508be64..2628fafd 100644 --- a/gatchat/gatserver.h +++ b/gatchat/gatserver.h @@ -102,7 +102,15 @@ void g_at_server_send_unsolicited(GAtServer *server, const char *result); /* Send an information text. The text could contain multiple lines. Each * line, including line terminators, should not exceed 2048 characters. */ -void g_at_server_send_info_text(GAtServer *server, GSList *text); +void g_at_server_send_info_lines(GAtServer *server, GSList *text); + +/* + * Send a single response line for the command. The line should be no longer + * than 2048 characters. If the response contains multiple lines, use + * g_at_server_send_info_lines instead, since the formatting of 27.007 + * compliant multi-line responses is different. + */ +void g_at_server_send_info(GAtServer *server, const char *line); #ifdef __cplusplus } |