Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3276237
D5003.id16435.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1019 B
Referenced Files
None
Subscribers
None
D5003.id16435.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5003: [services] Backup - Add tools for blob client
Attached
Detach File
Event Timeline
Log In to Comment