Changeset f898ded in nscp
- Timestamp:
- 08/01/12 23:52:25 (10 months ago)
- Branches:
- master, 0.4.1, 0.4.2
- Children:
- b611d99
- Parents:
- 7263789
- Files:
-
- 6 edited
-
changelog (modified) (1 diff)
-
include/settings/impl/settings_http.hpp (modified) (1 diff)
-
include/settings/settings_core.hpp (modified) (1 diff)
-
include/settings/settings_interface_impl.hpp (modified) (1 diff)
-
service/cli_parser.hpp (modified) (1 diff)
-
service/settings_client.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
changelog
r3af7590 rf898ded 7 7 2012-08-01 MickeM 8 8 * Resolved issue with crypto++ on linux (introduced by buildspeedups) 9 * Added so running "nscp settings" will list all loaded settins context (as a tree). 10 Quick way to see where your settings are stored. 9 11 10 12 2012-07-31 MickeM -
include/settings/impl/settings_http.hpp
rf14ab71 rf898ded 42 42 if (!http::client::download(url.protocol, url.host, url.path, os, error)) { 43 43 os.close(); 44 get_logger()->error(__FILE__, __LINE__, _T("Failed to download settings: ") + utf8:: cvt<std::wstring>(error));44 get_logger()->error(__FILE__, __LINE__, _T("Failed to download settings: ") + utf8::to_unicode(error)); 45 45 } 46 46 os.close(); -
include/settings/settings_core.hpp
rf14ab71 rf898ded 477 477 } 478 478 479 479 virtual std::list<boost::shared_ptr<settings_interface> > get_children() = 0; 480 480 }; 481 481 -
include/settings/settings_interface_impl.hpp
rc3f233d rf898ded 130 130 return core_; 131 131 } 132 constnsclient::logging::logger_interface* get_logger() const {132 nsclient::logging::logger_interface* get_logger() const { 133 133 return nsclient::logging::logger::get_logger(); 134 134 } 135 135 136 136 void add_child(std::wstring context) { 137 MUTEX_GUARD(); 138 children_.push_back(get_core()->create_instance(context)); 137 try { 138 instance_raw_ptr child = get_core()->create_instance(context); 139 { 140 MUTEX_GUARD(); 141 children_.push_back(child); 142 } 143 } catch (const std::exception &e) { 144 get_logger()->error(__FILE__, __LINE__, _T("Failed to load child: ") + utf8::to_unicode(e.what())); 145 } 146 } 147 148 virtual std::list<boost::shared_ptr<settings_interface> > get_children() { 149 return children_; 139 150 } 140 151 -
service/cli_parser.hpp
rf14ab71 rf898ded 271 271 } else { 272 272 std::cout << all << std::endl; 273 client.list_settings_info(); 273 274 return 1; 274 275 } -
service/settings_client.hpp
rf14ab71 rf898ded 197 197 nsclient::logging::logger::get_logger()->debug(__FILE__, __LINE__, msg.c_str()); 198 198 } 199 200 void list_settings_context_info(int padding, settings::instance_ptr instance) { 201 std::wstring pad = std::wstring(padding, L' '); 202 std::wcout << pad << instance->get_info() << std::endl; 203 BOOST_FOREACH(settings::instance_ptr child, instance->get_children()) { 204 list_settings_context_info(padding+2, child); 205 } 206 } 207 void list_settings_info() { 208 std::wcout << _T("Current settings instance loaded: ") << std::endl; 209 list_settings_context_info(2, settings_manager::get_settings()); 210 } 199 211 }; 200 212 }
Note: See TracChangeset
for help on using the changeset viewer.








