~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431

« back to all changes in this revision

Viewing changes to src/mxml/xml_to_json.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2009-04-22 21:39:19 UTC
  • mto: (4.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090422213919-52m015y6gcpv1m1g
Tags: upstream-0.12.0~svn2018
ImportĀ upstreamĀ versionĀ 0.12.0~svn2018

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*MT*
 
2
    
 
3
    MediaTomb - http://www.mediatomb.cc/
 
4
    
 
5
    xml_to_json.h - this file is part of MediaTomb.
 
6
    
 
7
    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
 
8
                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
 
9
    
 
10
    Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
 
11
                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
 
12
                            Leonhard Wimmer <leo@mediatomb.cc>
 
13
    
 
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.
 
17
    
 
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.
 
22
    
 
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.
 
26
    
 
27
    $Id: xml_to_json.h 2010 2009-01-11 19:10:43Z lww $
 
28
*/
 
29
 
 
30
/// \file xml_to_json.h
 
31
 
 
32
#ifndef __MXML_XML_TO_JSON_H__
 
33
#define __MXML_XML_TO_JSON_H__
 
34
 
 
35
#include "zmmf/zmmf.h"
 
36
 
 
37
#include "mxml.h"
 
38
 
 
39
namespace mxml
 
40
{
 
41
 
 
42
class XML2JSON : public zmm::Object
 
43
{
 
44
protected:
 
45
    static void handleElement(zmm::Ref<zmm::StringBuffer> buf, zmm::Ref<Element> el);
 
46
    static zmm::String getValue(zmm::String text, enum mxml_value_type type);
 
47
public:
 
48
    static zmm::String getJSON(zmm::Ref<Element> root);
 
49
    
 
50
};
 
51
 
 
52
} // namespace
 
53
 
 
54
#endif // __MXML_XML_TO_JSON_H__