summaryrefslogtreecommitdiff
path: root/adb/client/fastdeploycallbacks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adb/client/fastdeploycallbacks.cpp')
-rw-r--r--adb/client/fastdeploycallbacks.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/adb/client/fastdeploycallbacks.cpp b/adb/client/fastdeploycallbacks.cpp
index 23a0aca59d..86ceaa1378 100644
--- a/adb/client/fastdeploycallbacks.cpp
+++ b/adb/client/fastdeploycallbacks.cpp
@@ -49,35 +49,7 @@ class DeployAgentBufferCallback : public StandardStreamsCallbackInterface {
int capture_shell_command(const char* command, std::vector<char>* outBuffer,
std::vector<char>* errBuffer) {
DeployAgentBufferCallback cb(outBuffer, errBuffer);
- return send_shell_command(command, false, &cb);
-}
-
-DeployAgentFileCallback::DeployAgentFileCallback(FILE* outputFile, std::vector<char>* errBuffer) {
- mpOutFile = outputFile;
- mpErrBuffer = errBuffer;
- mBytesWritten = 0;
-}
-
-void DeployAgentFileCallback::OnStdout(const char* buffer, int length) {
- if (mpOutFile != NULL) {
- int bytes_written = fwrite(buffer, 1, length, mpOutFile);
- if (bytes_written != length) {
- printf("Write error %d\n", bytes_written);
- }
- mBytesWritten += bytes_written;
- }
-}
-
-void DeployAgentFileCallback::OnStderr(const char* buffer, int length) {
- appendBuffer(mpErrBuffer, buffer, length);
-}
-
-int DeployAgentFileCallback::Done(int status) {
- return status;
-}
-
-int DeployAgentFileCallback::getBytesWritten() {
- return mBytesWritten;
+ return send_shell_command(command, /*disable_shell_protocol=*/false, &cb);
}
DeployAgentBufferCallback::DeployAgentBufferCallback(std::vector<char>* outBuffer,