Page MenuHomePhabricator

D5003.id16435.diff
No OneTemporary

D5003.id16435.diff

diff --git a/services/backup/src/Tools.h b/services/backup/src/Tools.h
--- a/services/backup/src/Tools.h
+++ b/services/backup/src/Tools.h
@@ -1,5 +1,7 @@
#pragma once
+#include <blob.pb.h>
+
#include <string>
namespace comm {
@@ -15,6 +17,10 @@
std::string validateAttachmentHolders(const std::string &holders);
+int charPtrToInt(const char *str);
+
+size_t getBlobPutField(blob::PutRequest::DataCase field);
+
} // namespace tools
} // namespace network
} // namespace comm
diff --git a/services/backup/src/Tools.cpp b/services/backup/src/Tools.cpp
--- a/services/backup/src/Tools.cpp
+++ b/services/backup/src/Tools.cpp
@@ -52,6 +52,20 @@
return result;
}
+int charPtrToInt(const char *str) {
+ unsigned int intValue;
+ std::stringstream strValue;
+
+ strValue << str;
+ strValue >> intValue;
+
+ return intValue;
+}
+
+size_t getBlobPutField(blob::PutRequest::DataCase field) {
+ return static_cast<size_t>(field);
+}
+
} // namespace tools
} // namespace network
} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 7:24 AM (15 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2518010
Default Alt Text
D5003.id16435.diff (1019 B)

Event Timeline