3
MediaTomb - http://www.mediatomb.cc/
5
weborama_content_handler.h - this file is part of MediaTomb.
7
Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
10
Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
11
Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
Leonhard Wimmer <leo@mediatomb.cc>
14
MediaTomb is free software; you can redistribute it and/or modify
15
it under the terms of the GNU General Public License version 2
16
as published by the Free Software Foundation.
18
MediaTomb is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
GNU General Public License for more details.
23
You should have received a copy of the GNU General Public License
24
version 2 along with MediaTomb; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
30
/// \file weborama_content_handler.h
31
/// \brief Definitions of the WeboramaContentHandler class.
35
#ifndef __WEBORAMA_CONTENT_HANDLER_H__
36
#define __WEBORAMA_CONTENT_HANDLER_H__
38
#define WEBORAMA_SERVICE "Weborama"
39
#define WEBORAMA_SERVICE_ID "W"
41
#define WEBORAMA_AUXDATA_REQUEST_NAME WEBORAMA_SERVICE_ID "0"
43
#include "zmmf/zmmf.h"
44
#include "mxml/mxml.h"
45
#include "cds_objects.h"
47
/// \brief this class is responsible for creating objects from the Weborama
49
class WeboramaContentHandler : public zmm::Object
52
/// \brief Sets the service XML from which we will extract the objects.
53
/// \return false if service XML contained an error status.
54
bool setServiceContent(zmm::Ref<mxml::Element> service);
56
/// \brief retrieves an object from the service.
58
/// Each invokation of this funtion will return a new object,
59
/// when the whole service XML is parsed and no more objects are left,
60
/// this function will return nil.
62
/// \return CdsObject or nil if there are no more objects to parse.
63
zmm::Ref<CdsObject> getNextObject();
66
zmm::Ref<mxml::Element> service_xml;
67
int current_track_index;
72
#endif//__WEBORAMA_CONTENT_HANDLER_H__