Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/shared/Communication.h

Issue 10845030: Marshal all libadblockplus calls to the engine process (Closed)
Patch Set: Created May 31, 2013, 2:20 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/engine/main.cpp ('K') | « src/plugin/PluginUserSettings.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/Communication.h
===================================================================
--- a/src/shared/Communication.h
+++ b/src/shared/Communication.h
@@ -14,17 +14,17 @@ namespace Communication
extern const std::wstring pipeName;
const int bufferSize = 1024;
enum ValueType {TYPE_STRING, TYPE_WSTRING, TYPE_INT64, TYPE_INT32, TYPE_BOOL};
class InputBuffer
{
public:
- InputBuffer(const std::string& data) : buffer(data) {}
+ InputBuffer(const std::string& data) : buffer(data), hasType(false) {}
InputBuffer& operator>>(std::string& value) { return ReadString(value, TYPE_STRING); }
InputBuffer& operator>>(std::wstring& value) { return ReadString(value, TYPE_WSTRING); }
InputBuffer& operator>>(int64_t& value) { return Read(value, TYPE_INT64); }
InputBuffer& operator>>(int32_t& value) { return Read(value, TYPE_INT32); }
InputBuffer& operator>>(bool& value) { return Read(value, TYPE_BOOL); }
private:
std::istringstream buffer;
int32_t currentType;
« src/engine/main.cpp ('K') | « src/plugin/PluginUserSettings.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld