addon: Rename get_addon_info() and set_addon_info()...

...to better reflect their function

They have been renamed to get_addon_pbl_info() and set_addon_pbl_info(),
respectively. This also makes sense given the existing have_addon_pbl_info()
function.
This commit is contained in:
Ignacio R. Morelle 2012-02-25 02:45:35 +00:00
parent 21f5c99e55
commit 7b16b67e80
3 changed files with 7 additions and 7 deletions

View File

@ -104,7 +104,7 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
response_message.clear();
config cfg;
get_addon_info(id, cfg);
get_addon_pbl_info(id, cfg);
utils::string_map i18n_symbols;
i18n_symbols["addon_title"] = cfg["title"];
@ -121,7 +121,7 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
passphrase[n] = 'a' + (rand()%26);
}
cfg["passphrase"] = passphrase;
set_addon_info(id, cfg);
set_addon_pbl_info(id, cfg);
LOG_ADDONS << "automatically generated an initial passphrase for " << id << '\n';
}
@ -155,7 +155,7 @@ bool addons_client::delete_remote_addon(const std::string& id, std::string& resp
response_message.clear();
config cfg;
get_addon_info(id, cfg);
get_addon_pbl_info(id, cfg);
utils::string_map i18n_symbols;
i18n_symbols["addon_title"] = cfg["title"];

View File

@ -83,13 +83,13 @@ bool have_addon_pbl_info(const std::string& addon_name)
file_exists(parentd+"/"+addon_name+"/_server.pbl");
}
void get_addon_info(const std::string& addon_name, config& cfg)
void get_addon_pbl_info(const std::string& addon_name, config& cfg)
{
scoped_istream stream = istream_file(get_pbl_file_path(addon_name));
read(cfg, *stream);
}
void set_addon_info(const std::string& addon_name, const config& cfg)
void set_addon_pbl_info(const std::string& addon_name, const config& cfg)
{
scoped_ostream stream = ostream_file(get_pbl_file_path(addon_name));
write(*stream, cfg);

View File

@ -49,7 +49,7 @@ bool have_addon_in_vcs_tree(const std::string& addon_name);
* @param cfg A config object to store the add-on's
* properties.
*/
void get_addon_info(const std::string& addon_name, class config& cfg);
void get_addon_pbl_info(const std::string& addon_name, class config& cfg);
/**
* Sets the publish information for an add-on
@ -58,7 +58,7 @@ void get_addon_info(const std::string& addon_name, class config& cfg);
* @param cfg A config object from which the add-on's
* properties are copied.
*/
void set_addon_info(const std::string& addon_name, const class config& cfg);
void set_addon_pbl_info(const std::string& addon_name, const class config& cfg);
/**
* Replaces underscores to dress up file or dirnames as add-on titles.