00001 /* 00002 webEngine is the HTML processing library 00003 Copyright (C) 2009 Andrew Abramov aabramov@ptsecurity.ru 00004 00005 This file is part of webEngine 00006 00007 webEngineis free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 webEngineis distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with webEngine. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 #ifndef __WETASK_H__ 00021 #define __WETASK_H__ 00022 00023 #include <string> 00024 #include <map> 00025 #include <boost/any.hpp> 00026 #include "weiBase.h" 00027 #include "weOptions.h" 00028 #include "weiTransport.h" 00029 #include "weiParser.h" 00030 00031 using boost::any_cast; 00032 using namespace boost; 00033 using namespace std; 00034 00035 #define WE_VERSION_ID 0 00036 00045 class WeTask : public iweOptionsProvider 00046 { 00047 public: 00048 WeTask(); 00049 WeTask(WeTask& cpy); 00050 ~WeTask(); 00051 00052 virtual WeOption& Option(const string& name); 00053 virtual bool IsSet(const string& name); 00054 virtual void Option(const string& name, WeOptionVal val); 00055 00056 void SetTransport(const string& transp); 00057 void SetTransport(iweTransport* transp); 00058 00059 bool IsReady(); 00060 iweResponse* GetRequest(iweRequest* req); 00061 iweResponse* GetRequestAsync(iweRequest* req); 00062 00063 #ifndef __DOXYGEN__ 00064 protected: 00065 WeOptions options; 00066 iweTransport* transport; 00067 #endif //__DOXYGEN__ 00068 00069 private: 00070 DECLARE_SERIALIZATOR 00071 { 00072 ar & BOOST_SERIALIZATION_NVP(options); 00073 }; 00074 }; 00075 00076 BOOST_CLASS_TRACKING(WeTask, boost::serialization::track_never) 00077 00078 #endif //__WETASK_H__
©2009 Positive Technologies |
Generated on Tue Jul 14 18:27:31 2009 for WebEngine by |
|
1.5.7 |
|