From 594947793c98e8e7f58f0e9b2cb962c9ef23adeb Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Fri, 20 Apr 2012 15:21:07 -0700 Subject: Add ability to quote responses as needed. It's up to the protocol to know when quotes are required. In the future the response should probably all be binary blobs with lengths. bug:6353048 Change-Id: I3f9b48ab0f4e6746d75cdc9c0c84d33f38f63661 --- include/sysutils/SocketClient.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/sysutils/SocketClient.h b/include/sysutils/SocketClient.h index 4d7c4fa7..85b58efc 100644 --- a/include/sysutils/SocketClient.h +++ b/include/sysutils/SocketClient.h @@ -64,6 +64,9 @@ public: void incRef(); bool decRef(); // returns true at 0 (but note: SocketClient already deleted) + // return a new string in quotes with '\\' and '\"' escaped for "my arg" transmissions + static char *quoteArg(const char *arg); + private: // Send null-terminated C strings int sendMsg(const char *msg); -- cgit v1.2.3