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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 29449592: Issue 5183 - Provide async interface for FileSystem (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Make read write deal with binary buffers. Created July 6, 2017, 12:19 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
Index: include/AdblockPlus/JsValue.h
===================================================================
--- a/include/AdblockPlus/JsValue.h
+++ b/include/AdblockPlus/JsValue.h
@@ -62,16 +62,17 @@
bool IsNull() const;
bool IsString() const;
bool IsNumber() const;
bool IsBool() const;
bool IsObject() const;
bool IsArray() const;
bool IsFunction() const;
std::string AsString() const;
+ std::vector<char> AsBuffer() const;
int64_t AsInt() const;
bool AsBool() const;
JsValueList AsList() const;
/**
* Returns a list of property names if this is an object (see `IsObject()`).
* @return List of property names.
*/
@@ -87,16 +88,17 @@
//@{
/**
* Sets a property value if this is an object (see `IsObject()`).
* @param name Property name.
* @param val Property value.
*/
void SetProperty(const std::string& name, const std::string& val);
+ void SetProperty(const std::string& name, const std::vector<char>& val);
void SetProperty(const std::string& name, int64_t val);
void SetProperty(const std::string& name, bool val);
void SetProperty(const std::string& name, const JsValue& value);
inline void SetProperty(const std::string& name, const char* val)
{
SetProperty(name, std::string(val));
}
inline void SetProperty(const std::string& name, int val)

Powered by Google App Engine
This is Rietveld