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) |