File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ error_(false)
49
49
DataDownload::~DataDownload ()
50
50
{
51
51
SAFE_RELEASE_ARRAY (stream_);
52
+
53
+ Proxy* proxy = static_cast <Proxy*>(Baseapp::getSingleton ().findEntity (entityID_));
54
+
55
+ if (proxy)
56
+ {
57
+ proxy->onStreamComplete (id_, totalSentBytes_ == totalBytes_);
58
+ }
52
59
}
53
60
54
61
// -------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -798,5 +798,14 @@ bool Proxy::sendToClient(bool expectData)
798
798
return true ;
799
799
}
800
800
801
+ // -------------------------------------------------------------------------------------
802
+ void Proxy::onStreamComplete (int16 id, bool success)
803
+ {
804
+ SCOPED_PROFILE (SCRIPTCALL_PROFILE);
805
+
806
+ SCRIPT_OBJECT_CALL_ARGS2 (this , const_cast <char *>(" onStreamComplete" ),
807
+ const_cast <char *>(" hO" ), id, success ? Py_True : Py_False);
808
+ }
809
+
801
810
// -------------------------------------------------------------------------------------
802
811
}
Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ class Proxy : public Base
112
112
*/
113
113
void onEntitiesEnabled (void );
114
114
115
+ /* *
116
+ 一个数据下载任务完成
117
+ */
118
+ void onStreamComplete (int16 id, bool success);
119
+
115
120
/* *
116
121
登陆尝试, 当正常的登陆失败之后, 调用这个接口再进行尝试
117
122
*/
You can’t perform that action at this time.
0 commit comments