/*MT* MediaTomb - http://www.mediatomb.cc/ request_handler.cc - this file is part of MediaTomb. Copyright (C) 2005 Gena Batyan , Sergey 'Jin' Bostandzhyan Copyright (C) 2006-2007 Gena Batyan , Sergey 'Jin' Bostandzhyan , Leonhard Wimmer MediaTomb is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. MediaTomb is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License version 2 along with MediaTomb; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. $Id: request_handler.cc 1130 2007-02-18 02:04:14Z jin_eld $ */ /// \file request_handler.cc #ifdef HAVE_CONFIG_H #include "autoconfig.h" #endif #include "request_handler.h" #include "tools.h" using namespace zmm; void RequestHandler::split_url(const char *url, char separator, String &path, String ¶meters) { int i1; String url_s = unescape_amp(String(url)); if (separator == '/') i1 = url_s.rindex(separator); else if (separator == '?') i1 = url_s.index(separator); else throw _Exception(_("Forbidden separator: " + separator)); url_s = url_unescape(url_s); if (i1 < 0) { path = url_s; parameters = _(""); } else { parameters = url_s.substring(i1 + 1); path = url_s.substring(0, i1); } } RequestHandler::RequestHandler() : zmm::Object() { } void RequestHandler::get_info(IN const char *filename, OUT struct File_Info *info) { } Ref RequestHandler::open(IN const char *filename, OUT struct File_Info *info, IN enum UpnpOpenFileMode mode) { return nil; }