本文整理汇总了C++中UrlEncoder类的典型用法代码示例。如果您正苦于以下问题:C++ UrlEncoder类的具体用法?C++ UrlEncoder怎么用?C++ UrlEncoder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UrlEncoder类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddGameInfo
void AddGameInfo(UrlEncoder &postdata)
{
// 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("sdkver", sceKernelGetCompiledSdkVersion());
}
示例2: AddConfigInfo
void AddConfigInfo(UrlEncoder &postdata)
{
postdata.Add("pixel_width", PSP_CoreParameter().pixelWidth);
postdata.Add("pixel_height", PSP_CoreParameter().pixelHeight);
g_Config.GetReportingInfo(postdata);
}
示例3: AddSystemInfo
void AddSystemInfo(UrlEncoder &postdata)
{
std::string gpuPrimary, gpuFull;
if (gpu)
gpu->GetReportingInfo(gpuPrimary, gpuFull);
postdata.Add("version", PPSSPP_GIT_VERSION);
postdata.Add("gpu", gpuPrimary);
postdata.Add("gpu_full", gpuFull);
postdata.Add("cpu", cpu_info.Summarize());
postdata.Add("platform", GetPlatformIdentifer());
}
示例4: AddGameplayInfo
void AddGameplayInfo(UrlEncoder &postdata)
{
// Just to get an idea of how long they played.
postdata.Add("ticks", (const uint64_t)CoreTiming::GetTicks());
float vps, fps;
__DisplayGetAveragedFPS(&vps, &fps);
postdata.Add("vps", vps);
postdata.Add("fps", fps);
postdata.Add("savestate_used", SaveState::HasLoadedState());
}
示例5: Report
void Report(UrlEncoder &data, const std::string &prefix) {
if (!report_)
return;
switch (type_) {
case TYPE_BOOL:
return data.Add(prefix + ini_, *ptr_.b);
case TYPE_INT:
return data.Add(prefix + ini_, *ptr_.i);
case TYPE_FLOAT:
return data.Add(prefix + ini_, *ptr_.f);
case TYPE_STRING:
return data.Add(prefix + ini_, *ptr_.s);
default:
_dbg_assert_msg_(LOADER, false, "Unexpected ini setting type");
return;
}
}
示例6: 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;
}
示例7: AddGameInfo
void AddGameInfo(UrlEncoder &postdata)
{
postdata.Add("game", CurrentGameID());
postdata.Add("game_title", StripTrailingNull(g_paramSFO.GetValueString("TITLE")));
postdata.Add("sdkver", sceKernelGetCompiledSdkVersion());
}
示例8: 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;
}