Description- don't expose in JS API `Subscription::Serialize`
- remove `Subscription::SerializeFilters`
- add JS _FilterStorage_Parser bound to C++ Parser and is aliased to require("filterStorage").Parser.
- add JS _FilterStorage_Serializer bound to C++ `Serializer` and is aliased to require("filterStorage").Serializer
- add C++ only `Subscription` factory method `Subscription::FromProperties(const KeyValues& properties)`, `Subscription::KeyValues` and constructor for `Subscription` classes accepting `KeyValues` allowing to construct a subscription from pairs of subscription properties according to the `url` property (either `DownloadableSubscritpion` or `UserDefinedSubscription`).
- make the constructor of `Subscription` protected
- add C++ only version of `Subscription::AddFilter(Filter&)` adding a filter to the end of subscription filters without notifications.
- add C++ only `const Filters& Subscription::GetFilters() const`, for present it's used by `Serializer`.
- rename `Subscription::Serialize` to `Subscription::SerializerProperties` because it serializes only certain subscription properties. It's kept as a member of `Subscription` for the sake of simplicity.
- add `testEqualObjProperties` to test/_test-utils.js comparing properties of emscripten classes objects.
- update tests
The implementations of both `Parser` and `Serializer` are not complete yet in accordance with the issue. It is the first step having the core functionality, allowing to write tests and start to use them, at least partially. In particular, beside some other things, `Parser` is not connected with `FilterStroage` yet and it has to implicitly affect global `knownFilters` and `knownSubscriptions`, `Serializer` does not provide with generator-like interface, does not do anything keeping a passed subscription unmodified externally during serialization process and is not connected with `FilterEngine` either, and there is no conversion to UTF-8.
Patch Set 1 #
Total comments: 28
Patch Set 2 : rebase #
Total comments: 2
MessagesTotal messages: 10
|