------------------------------------------------------------ revno: 28 committer: poy <p...@123gen.com> branch nick: dcpp-plugin-sdk-cpp timestamp: Sun 2013-06-02 19:39:05 +0200 message: update defs modified: pluginsdk/Config.cpp pluginsdk/Config.h pluginsdk/PluginDefs.h
-- lp:dcpp-plugin-sdk-cpp https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/trunk Your team Dcplusplus-team is subscribed to branch lp:dcpp-plugin-sdk-cpp. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/trunk/+edit-subscription
=== modified file 'pluginsdk/Config.cpp' --- pluginsdk/Config.cpp 2013-04-23 18:12:02 +0000 +++ pluginsdk/Config.cpp 2013-06-02 17:39:05 +0000 @@ -49,7 +49,12 @@ ConfigValuePtr Config::getCoreConfig(const char* name) { return config->get_cfg("CoreSetup", name, CFG_TYPE_UNKNOWN); } void Config::freeCoreConfig(ConfigValuePtr value) { config->release(value); } -string Config::getPath(PathType type) { return config->get_path(type); } +string Config::getPath(PathType type) { + auto cfg = config->get_path(type); + string ret(cfg->value); + config->release(reinterpret_cast<ConfigValuePtr>(cfg)); + return ret; +} string Config::getInstallPath() { auto cfg = config->get_install_path(guid.c_str()); === modified file 'pluginsdk/Config.h' --- pluginsdk/Config.h 2013-04-23 18:12:02 +0000 +++ pluginsdk/Config.h 2013-06-02 17:39:05 +0000 @@ -51,7 +51,6 @@ static void freeCoreConfig(ConfigValuePtr value); static string getPath(PathType type); - static string getInstallPath(); private: === modified file 'pluginsdk/PluginDefs.h' --- pluginsdk/PluginDefs.h 2013-06-02 11:49:37 +0000 +++ pluginsdk/PluginDefs.h 2013-06-02 17:39:05 +0000 @@ -338,7 +338,7 @@ /* Config API version */ uint32_t apiVersion; - const char* (DCAPI *get_path) (PathType type); + ConfigStrPtr (DCAPI *get_path) (PathType type); ConfigStrPtr (DCAPI *get_install_path) (const char* guid); void (DCAPI *set_cfg) (const char* guid, const char* setting, ConfigValuePtr val);
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp