本文整理汇总了C++中UrlEncoder::ToString方法的典型用法代码示例。如果您正苦于以下问题:C++ UrlEncoder::ToString方法的具体用法?C++ UrlEncoder::ToString怎么用?C++ UrlEncoder::ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlEncoder
的用法示例。
在下文中一共展示了UrlEncoder::ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Process
int Process(int pos)
{
Payload &payload = payloadBuffer[pos];
std::string gpuPrimary, gpuFull;
if (gpu)
gpu->GetReportingInfo(gpuPrimary, gpuFull);
UrlEncoder postdata;
postdata.Add("version", PPSSPP_GIT_VERSION);
// TODO: Maybe ParamSFOData shouldn't include nulls in std::strings? Don't work to break savedata, though...
postdata.Add("game", StripTrailingNull(g_paramSFO.GetValueString("DISC_ID")) + "_" + StripTrailingNull(g_paramSFO.GetValueString("DISC_VERSION")));
postdata.Add("game_title", StripTrailingNull(g_paramSFO.GetValueString("TITLE")));
postdata.Add("gpu", gpuPrimary);
postdata.Add("gpu_full", gpuFull);
postdata.Add("cpu", cpu_info.Summarize());
postdata.Add("platform", GetPlatformIdentifer());
postdata.Add("sdkver", sceKernelGetCompiledSdkVersion());
postdata.Add("pixel_width", PSP_CoreParameter().pixelWidth);
postdata.Add("pixel_height", PSP_CoreParameter().pixelHeight);
postdata.Add("ticks", (const uint64_t)CoreTiming::GetTicks());
if (g_Config.iShowFPSCounter)
{
float vps, fps;
__DisplayGetAveragedFPS(&vps, &fps);
postdata.Add("vps", vps);
postdata.Add("fps", fps);
}
// TODO: Settings, savestate/savedata status, some measure of speed/fps?
switch (payload.type)
{
case MESSAGE:
postdata.Add("message", payload.string1);
postdata.Add("value", payload.string2);
payload.string1.clear();
payload.string2.clear();
SendReportRequest("/report/message", postdata.ToString());
break;
}
return 0;
}
示例2: Process
int Process(int pos)
{
Payload &payload = payloadBuffer[pos];
UrlEncoder postdata;
AddSystemInfo(postdata);
AddGameInfo(postdata);
AddConfigInfo(postdata);
AddGameplayInfo(postdata);
switch (payload.type)
{
case MESSAGE:
postdata.Add("message", payload.string1);
postdata.Add("value", payload.string2);
payload.string1.clear();
payload.string2.clear();
SendReportRequest("/report/message", postdata.ToString());
break;
}
return 0;
}