MCPcopy Create free account
hub / github.com/bumptop/BumpTop / transferFinished

Method transferFinished

trunk/win/Source/BT_JavaScriptAPI.cpp:214–222  ·  view source on GitHub ↗

Helper function for transfers started with sendHttpPostFileUpload()

Source from the content-addressed store, hash-verified

212
213// Helper function for transfers started with sendHttpPostFileUpload()
214void JavaScriptAPI::transferFinished(const FileTransfer& transfer, bool success)
215{
216 QString *callbackName = (QString *)transfer.getUserData();
217 assert(_stringData.isNull());
218 _stringData = transfer.getTemporaryString();
219 _page->evaluateJavaScript(QString("%1(BumpTopNative.internal_getStringData(), %2);")
220 .arg(*callbackName).arg(success ? "true" : "false"));
221 delete callbackName;
222}
223
224// Callback for transfers that were enqueued with the FileTransferManager
225void JavaScriptAPI::onTransferComplete( const FileTransfer& transfer )

Callers

nothing calls this directly

Calls 7

assertClass · 0.85
getUserDataMethod · 0.80
getTemporaryStringMethod · 0.80
evaluateJavaScriptMethod · 0.80
QStringFunction · 0.50
isNullMethod · 0.45
argMethod · 0.45

Tested by

no test coverage detected