00001 /* $Id: manager.hpp 53411 2012-03-03 19:33:27Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2003 - 2008 by David White <dave@whitevine.net> 00004 2008 - 2012 by Ignacio R. Morelle <shadowm2006@gmail.com> 00005 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY. 00013 00014 See the COPYING file for more details. 00015 */ 00016 00017 #ifndef ADDON_MANAGER_HPP_INCLUDED 00018 #define ADDON_MANAGER_HPP_INCLUDED 00019 00020 class config; 00021 class version_info; 00022 00023 #include "addon/validation.hpp" 00024 00025 #include <string> 00026 #include <vector> 00027 #include <utility> 00028 00029 bool remove_local_addon(const std::string& addon); 00030 00031 /** 00032 * Returns true if there's a local .pbl file stored for the specified add-on. 00033 */ 00034 bool have_addon_pbl_info(const std::string& addon_name); 00035 00036 /** 00037 * Returns true if the specified add-ons appear to be managed by a 'supported' VCS. 00038 * 00039 * Currently supported VCSes are: Subversion, Git, Mercurial. 00040 */ 00041 bool have_addon_in_vcs_tree(const std::string& addon_name); 00042 00043 /** 00044 * Gets the publish information for an add-on. 00045 * 00046 * @param addon_name The add-on's main directory/file name. 00047 * @param cfg A config object to store the add-on's 00048 * properties. 00049 */ 00050 void get_addon_pbl_info(const std::string& addon_name, class config& cfg); 00051 00052 /** 00053 * Sets the publish information for an add-on 00054 * 00055 * @param addon_name The add-on's main directory/file name. 00056 * @param cfg A config object from which the add-on's 00057 * properties are copied. 00058 */ 00059 void set_addon_pbl_info(const std::string& addon_name, const class config& cfg); 00060 00061 /** Returns a list of local add-ons that can be published. */ 00062 std::vector<std::string> available_addons(); 00063 00064 /** Retrieves the names of all installed add-ons. */ 00065 std::vector<std::string> installed_addons(); 00066 00067 /** Chekc whether the specified add-on is currently installed. */ 00068 bool is_addon_installed(const std::string& addon_name); 00069 00070 /** Archives an add-on into a config object for campaignd transactions. */ 00071 void archive_addon(const std::string& addon_name, class config& cfg); 00072 00073 /** Unarchives an add-on from campaignd's retrieved config object. */ 00074 void unarchive_addon(const class config& cfg); 00075 00076 /** Refreshes the per-session cache of add-on's version information structs. */ 00077 void refresh_addon_version_info_cache(); 00078 00079 /** Returns a particular installed add-on's version information. */ 00080 version_info get_addon_version_info(const std::string& addon); 00081 00082 #endif /* !ADDON_MANAGEMENT_HPP_INCLUDED */
| Generated by doxygen 1.7.1 on Tue May 22 2012 01:03:34 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |