MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / UploadString

Method UploadString

NetStream/source/np_utils.cpp:206–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206int32_t nputils::TUS::UploadString(uint32_t slot, const string& data)
207{
208 int32_t ret = SCE_OK;
209 int32_t request = 0;
210 SceNpTusDataInfo labelInfo;
211
212 ret = sceNpTusCreateRequest(m_ctx);
213 if (ret < 0)
214 {
215 return ret;
216 }
217 request = ret;
218
219 sce_paf_memset(&labelInfo, 0, sizeof(SceNpTusDataInfo));
220 sce_paf_strncpy(reinterpret_cast<char*>(labelInfo.data), s_tag.c_str(), sizeof(labelInfo.data) - 1);
221 labelInfo.infoSize = sce_paf_strlen(reinterpret_cast<char*>(labelInfo.data)) + 1;
222
223 ret = sceNpTusSetData(request, &m_npid, slot, data.length(), data.length(), data.c_str(), &labelInfo, sizeof(SceNpTusDataInfo), NULL, NULL, NULL);
224
225 sceNpTusDeleteRequest(request);
226
227 return ret;
228}
229
230int32_t nputils::TUS::DownloadString(uint32_t slot, string& data)
231{

Callers 1

CleanMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected