redmine::result redmine::action::config(redmine::cl::args &args, redmine::options &options) { if (0 == args.count()) { fprintf(stderr, "usage: redmine config <action> [args]\n" "actions:\n" " new <name>\n" " browser [<path>]\n" " editor [<path>]\n" " profile [<name>]\n" " key [<key>]\n" " url [<url>]\n" " port [<port>]\n" " use-ssl [true|false]\n" " verify-ssl [true|false]\n"); return FAILURE; } if (!strcmp("new", args[0])) { return config_new(++args, options); } if (!strcmp("browser", args[0])) { return config_browser(++args, options); } if (!strcmp("editor", args[0])) { return config_editor(++args, options); } if (!strcmp("profile", args[0])) { return config_profile(++args, options); } if (!strcmp("key", args[0])) { return config_key(++args, options); } if (!strcmp("url", args[0])) { return config_url(++args, options); } if (!strcmp("port", args[0])) { return config_port(++args, options); } if (!strcmp("use-ssl", args[0])) { return config_use_ssl(++args, options); } if (!strcmp("verify-ssl", args[0])) { return config_verify_ssl(++args, options); } fprintf(stderr, "invalid argument: %s\n", args[0]); return INVALID_ARGUMENT; }
// static void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location) { // Get upload configuration data. std::string config_url(getProfileURL(LLStringUtil::null) + "snapshots/s3_upload_config"); config_url += "?caption=" + LLURI::escape(caption); config_url += "&add_loc=" + std::string(add_location ? "1" : "0"); LL_DEBUGS("Snapshots") << "Requesting " << config_url << llendl; LLSD headers = LLViewerMedia::getHeaders(); headers["Cookie"] = getAuthCookie(); LLHTTPClient::get(config_url, new LLWebProfileResponders::ConfigResponder(image), headers); }
// static void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location) { // Get upload configuration data. std::string config_url(getProfileURL(LLStringUtil::null) + "snapshots/s3_upload_config"); config_url += "?caption=" + LLURI::escape(caption); config_url += "&add_loc=" + std::string(add_location ? "1" : "0"); LL_DEBUGS("Snapshots") << "Requesting " << config_url << LL_ENDL; AIHTTPHeaders headers; headers.addHeader("Accept", "*/*"); headers.addHeader("Cookie", LLWebProfile::getAuthCookie()); headers.addHeader("User-Agent", LLViewerMedia::getCurrentUserAgent()); LLHTTPClient::get(config_url, new LLWebProfileResponders::ConfigResponder(image), headers); }