libsysutils: const correctness fixes + remove some debugging
Signed-off-by: San Mehat <san@google.com>
diff --git a/include/sysutils/FrameworkClient.h b/include/sysutils/FrameworkClient.h
index 1eb112a..0ef0753 100644
--- a/include/sysutils/FrameworkClient.h
+++ b/include/sysutils/FrameworkClient.h
@@ -13,8 +13,8 @@
FrameworkClient(int sock);
virtual ~FrameworkClient() {}
- int sendMsg(char *msg);
- int sendMsg(char *msg, char *data);
+ int sendMsg(const char *msg);
+ int sendMsg(const char *msg, const char *data);
};
typedef android::List<FrameworkClient *> FrameworkClientCollection;
diff --git a/include/sysutils/SocketClient.h b/include/sysutils/SocketClient.h
index cde64a5..469dd9d 100644
--- a/include/sysutils/SocketClient.h
+++ b/include/sysutils/SocketClient.h
@@ -15,8 +15,8 @@
int getSocket() { return mSocket; }
- int sendMsg(int code, char *msg, bool addErrno);
- int sendMsg(char *msg);
+ int sendMsg(int code, const char *msg, bool addErrno);
+ int sendMsg(const char *msg);
};
typedef android::List<SocketClient *> SocketClientCollection;
diff --git a/include/sysutils/SocketListener.h b/include/sysutils/SocketListener.h
index 30d050d..68dcb8f 100644
--- a/include/sysutils/SocketListener.h
+++ b/include/sysutils/SocketListener.h
@@ -37,8 +37,8 @@
int startListener();
int stopListener();
- void sendBroadcast(int code, char *msg, bool addErrno);
- void sendBroadcast(char *msg);
+ void sendBroadcast(int code, const char *msg, bool addErrno);
+ void sendBroadcast(const char *msg);
protected:
virtual bool onDataAvailable(SocketClient *c) = 0;