当前位置: 首页>>代码示例>>C++>>正文


C++ UrlEncoder::ToString方法代码示例

本文整理汇总了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;
	}
开发者ID:173210,项目名称:ppsspp,代码行数:46,代码来源:Reporting.cpp

示例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;
	}
开发者ID:JakotsuTheOne,项目名称:ppsspp,代码行数:24,代码来源:Reporting.cpp


注:本文中的UrlEncoder::ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。