/* Demo Recorder for MAEMO 5 * Copyright (C) 2010 Dru Moore * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * or (at your option) any later version, as published by the Free * Software Foundation * * This program 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 along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ namespace IdWorks { namespace Tagging { public struct Tag { string tag; GLib.Value value; public string to_xml_string() { return ("\n" + "%s\n" + "%s\n" + "\n").printf( value.type_name(), tag , value.strdup_contents() ); } public void from_xml_node(Xml.Node* node) { // Tag is root } public void from_xml_node_helper(Xml.Node* node) { // Tag is below root } public static string taglist_to_xml_string(List taglist) { string ret = "\n"; for (int idx = 0; idx < taglist.length(); ++idx) { ret += ((Tagging.Tag)taglist.nth_data(idx)).to_xml_string(); } return ret + "\n"; } public static void taglist_from_xml_node_helper(Xml.Node* node, ref unowned List taglist) { } public static void taglist_from_xml_node(Xml.Node* node, ref unowned List taglist) { } } } }