00001 /*MT* 00002 00003 MediaTomb - http://www.mediatomb.cc/ 00004 00005 pages.h - this file is part of MediaTomb. 00006 00007 Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>, 00008 Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc> 00009 00010 Copyright (C) 2006-2010 Gena Batyan <bgeradz@mediatomb.cc>, 00011 Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>, 00012 Leonhard Wimmer <leo@mediatomb.cc> 00013 00014 MediaTomb is free software; you can redistribute it and/or modify 00015 it under the terms of the GNU General Public License version 2 00016 as published by the Free Software Foundation. 00017 00018 MediaTomb is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 version 2 along with MediaTomb; if not, write to the Free Software 00025 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 00026 00027 $Id: pages.h 2081 2010-03-23 20:18:00Z lww $ 00028 */ 00029 00032 #ifndef __WEB_PAGES_H__ 00033 #define __WEB_PAGES_H__ 00034 00035 #include "common.h" 00036 #include "dictionary.h" 00037 #include "request_handler.h" 00038 #include "web_request_handler.h" 00039 #include "cds_objects.h" 00040 00041 namespace web 00042 { 00043 00045 class auth : public WebRequestHandler 00046 { 00047 protected: 00048 int timeout; 00049 public: 00050 auth(); 00051 virtual void process(); 00052 }; 00053 00055 class containers : public WebRequestHandler 00056 { 00057 public: 00058 containers(); 00059 virtual void process(); 00060 }; 00061 00063 class directories : public WebRequestHandler 00064 { 00065 public: 00066 directories(); 00067 virtual void process(); 00068 }; 00069 00071 class files : public WebRequestHandler 00072 { 00073 public: 00074 files(); 00075 virtual void process(); 00076 }; 00077 00079 class items : public WebRequestHandler 00080 { 00081 public: 00082 items(); 00083 virtual void process(); 00084 }; 00085 00087 class add : public WebRequestHandler 00088 { 00089 public: 00090 add(); 00091 virtual void process(); 00092 }; 00093 00095 class remove : public WebRequestHandler 00096 { 00097 public: 00098 remove(); 00099 virtual void process(); 00100 }; 00101 00103 class edit_load : public WebRequestHandler 00104 { 00105 public: 00106 edit_load(); 00107 virtual void process(); 00108 }; 00109 00111 class edit_save : public WebRequestHandler 00112 { 00113 public: 00114 edit_save(); 00115 virtual void process(); 00116 }; 00117 00119 class addObject : public WebRequestHandler 00120 { 00121 public: 00122 addObject(); 00123 virtual void process(); 00124 protected: 00125 void addContainer(int parentID); 00126 zmm::Ref<CdsObject> addItem(int parentID, zmm::Ref<CdsItem> item); 00127 zmm::Ref<CdsObject> addUrl(int parentID, zmm::Ref<CdsItemExternalURL> item, bool addProtocol); 00128 zmm::Ref<CdsObject> addActiveItem(int parentID); 00129 }; 00130 00132 class autoscan : public WebRequestHandler 00133 { 00134 public: 00135 autoscan(); 00136 virtual void process(); 00137 protected: 00138 void autoscan2XML(zmm::Ref<mxml::Element> element, zmm::Ref<AutoscanDirectory> adir); 00139 }; 00140 00142 class voidType : public WebRequestHandler 00143 { 00144 public: 00145 virtual void process(); 00146 }; 00147 00149 class tasks : public WebRequestHandler 00150 { 00151 public: 00152 virtual void process(); 00153 }; 00154 00156 class action : public WebRequestHandler 00157 { 00158 public: 00159 action(); 00160 virtual void process(); 00161 }; 00162 00163 } // namespace 00164 00168 WebRequestHandler *create_web_request_handler(zmm::String page); 00169 00170 #endif // __WEB_PAGES_H__
1.6.1