本文整理汇总了C++中LLURI类的典型用法代码示例。如果您正苦于以下问题:C++ LLURI类的具体用法?C++ LLURI怎么用?C++ LLURI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLURI类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: get
void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const LLSD& headers, const F32 timeout)
{
LLURI uri;
uri = LLURI::buildHTTP(url, LLSD::emptyArray(), query);
get(uri.asString(), responder, headers, timeout);
}
示例2: get
void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const LLSD& headers,
const F32 timeout, bool follow_redirects /* = true */)
{
LLURI uri;
uri = LLURI::buildHTTP(url, LLSD::emptyArray(), query);
get(uri.asString(), responder, headers, timeout, follow_redirects);
}
示例3: checkParts
void checkParts(const LLURI& u,
const char* expectedScheme,
const char* expectedOpaque,
const char* expectedAuthority,
const char* expectedPath,
const char* expectedQuery = "")
{
ensure_equals("scheme", u.scheme(), expectedScheme);
ensure_equals("opaque", u.opaque(), expectedOpaque);
ensure_equals("authority", u.authority(), expectedAuthority);
ensure_equals("path", u.path(), expectedPath);
ensure_equals("query", u.query(), expectedQuery);
}
示例4: v
void SDTestObject::test<7>()
// Test assignment and casting to various scalar types. These
// assignments should invoke the right conversion without it being
// mentioned explicitly. The few exceptions are marked SAD.
{
SDCleanupCheck check;
LLSD v(" 42.375");
bool b = false;
b = v; ensure_equals("assign to bool", b, true);
b = (bool)v; ensure_equals("cast to bool", b, true);
int i = 99;
i = v; ensure_equals("assign to int", i, 42);
i = (int)v; ensure_equals("cast to int", i, 42);
double d = 3.14159;
d = v; ensure_equals("assign to double", d, 42.375);
d = (double)v; ensure_equals("cast to double", d, 42.375);
std::string s = "yo";
// SAD s = v; ensure_equals("assign to string", s, " 42.375");
s = (std::string)v; ensure_equals("cast to string", s, " 42.375");
std::string uuidStr = "b1e50c2b-b627-4d23-8a86-a65d97b6319b";
v = uuidStr;
LLUUID u;
u = v;
ensure_equals("assign to LLUUID", u, LLUUID(uuidStr));
// SAD u = (LLUUID)v;
// ensure_equals("cast to LLUUID", u, LLUUID(uuidStr));
std::string dateStr = "2005-10-24T15:00:00Z";
v = dateStr;
LLDate date;
date = v;
ensure_equals("assign to LLDate", date.asString(), dateStr);
// SAD date = (LLDate)v;
// ensure_equals("cast to LLDate", date.asString(), dateStr);
std::string uriStr = "http://secondlife.com";
v = uriStr;
LLURI uri;
uri = v;
ensure_equals("assign to LLURI", uri.asString(), uriStr);
// SAD uri = (LLURI)v;
// ensure_equals("cast to LLURI", uri.asString(), uriStr);
}
示例5: dataStream
void LLUpdateDownloader::Implementation::startDownloading(LLURI const & uri, std::string const & hash)
{
mDownloadData["url"] = uri.asString();
mDownloadData["hash"] = hash;
mDownloadData["current_version"] = ll_get_version();
LLSD path = uri.pathArray();
if(path.size() == 0) throw DownloadError("no file path");
std::string fileName = path[path.size() - 1].asString();
std::string filePath = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, fileName);
mDownloadData["path"] = filePath;
LL_INFOS("UpdateDownload") << "downloading " << filePath
<< " from " << uri.asString() << LL_ENDL;
LL_INFOS("UpdateDownload") << "hash of file is " << hash << LL_ENDL;
llofstream dataStream(mDownloadRecordPath);
LLSDSerialize::toPrettyXML(mDownloadData, dataStream);
mDownloadStream.open(filePath, std::ios_base::out | std::ios_base::binary);
initializeCurlGet(uri.asString(), true);
start();
}
示例6:
bool operator!=(const LLURI& first, const LLURI& second)
{
return (first.asString() != second.asString());
}