| Index: shell/src/Main.cpp |
| =================================================================== |
| --- a/shell/src/Main.cpp |
| +++ b/shell/src/Main.cpp |
| @@ -5,25 +5,16 @@ |
| #include "GcCommand.h" |
| #include "HelpCommand.h" |
| #include "FiltersCommand.h" |
| #include "SubscriptionsCommand.h" |
| #include "MatchesCommand.h" |
| namespace |
| { |
| - class CerrErrorCallback : public AdblockPlus::ErrorCallback |
| - { |
| - public: |
| - void operator()(const std::string& message) |
| - { |
| - std::cerr << "Error: " << message << std::endl; |
| - } |
| - }; |
| - |
| void Add(CommandMap& commands, Command* command) |
| { |
| commands[command->name] = command; |
| } |
| bool ReadCommandLine(std::string& commandLine) |
| { |
| std::cout << "> "; |
| @@ -41,24 +32,20 @@ namespace |
| std::getline(lineStream, arguments); |
| } |
| } |
| int main() |
| { |
| try |
| { |
| - AdblockPlus::DefaultFileSystem fileSystem; |
| - AdblockPlus::DefaultWebRequest webRequest; |
| - CerrErrorCallback errorCallback; |
| AdblockPlus::AppInfo appInfo; |
| appInfo.version = "1.0"; |
| appInfo.name = "Adblock Plus Shell"; |
| - AdblockPlus::JsEngine jsEngine(appInfo, &fileSystem, &webRequest, |
| - &errorCallback); |
| + AdblockPlus::JsEngine jsEngine(appInfo); |
| AdblockPlus::FilterEngine filterEngine(jsEngine); |
| CommandMap commands; |
| Add(commands, new GcCommand(jsEngine)); |
| Add(commands, new HelpCommand(commands)); |
| Add(commands, new FiltersCommand(filterEngine)); |
| Add(commands, new SubscriptionsCommand(filterEngine)); |
| Add(commands, new MatchesCommand(filterEngine)); |