logd: remove SocketClient from LogBuffer and LogBufferElement
In the future, we'll want to be able to write to outputs that are not
necessarily a libsysutils SocketClient, for example host tests of
LogBuffer. Therefore, we add a LogWriter class to be used instead of
SocketClient.
Test: logging unit tests
Change-Id: I4385be65e14e83a635691a7ba79e9bf060e49484
diff --git a/logd/LogBufferElement.h b/logd/LogBufferElement.h
index 3d0b65e..2f2d70d 100644
--- a/logd/LogBufferElement.h
+++ b/logd/LogBufferElement.h
@@ -22,7 +22,8 @@
#include <sys/types.h>
#include <log/log.h>
-#include <sysutils/SocketClient.h>
+
+#include "LogWriter.h"
class LogStatistics;
@@ -94,6 +95,5 @@
return mRealTime;
}
- static const uint64_t FLUSH_ERROR;
- uint64_t flushTo(SocketClient* writer, LogStatistics* parent, bool lastSame);
+ bool FlushTo(LogWriter* writer, LogStatistics* parent, bool lastSame);
};