// // aegis - project change supervisor // Copyright (C) 2003-2006, 2008, 2011-2014 Peter Miller // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or (at // your option) any later version. // // 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, see . // #include #include #include #include #include #include #include #include #include #include xml_project_list::~xml_project_list() { } xml_project_list::xml_project_list() { } xml::pointer xml_project_list::create() { return pointer(new xml_project_list()); } void xml_project_list::report(change_identifier &cid, output::pointer op) { trace(("xml_project_list()\n{\n")); if (cid.project_is_set()) list_project_inappropriate(); if (cid.is_set()) list_change_inappropriate(); // // list the projects // string_list_ty name; project_list_get(&name); // // list each project // op->fputs("\n\n"); for (size_t j = 0; j < name.size(); ++j) { op->fputs("\n"); project *pp = project_alloc(name[j]); pp->bind_existing(); string_write_xml(op, "name", project_name_get(pp)); int err = project_is_readable(pp); if (err) { op->fprintf("%s\n", strerror(err)); } else { string_write_xml(op, "description", project_description_get(pp)); // // The development directory of the project change is the // one which contains the trunk or branch baseline. // nstring top = pp->top_path_get(false); string_write_xml(op, "directory", top); } pp->free(); op->fputs("\n"); } op->fputs("\n\n"); trace(("}\n")); } // vim: set ts=8 sw=4 et :