MCPcopy Create free account
hub / github.com/defold/defold / AddMountAsync

Function AddMountAsync

engine/liveupdate/src/liveupdate.cpp:180–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 }
179
180 Result AddMountAsync(dmhash_t name_hash, const char* uri, int priority, void (*callback)(dmhash_t, const char*, int, void*), void* callback_data)
181 {
182 if (!IsLiveupdateEnabled())
183 return RESULT_NOT_INITIALIZED;
184 if (IsLiveupdateThreadDisabled())
185 return RESULT_NOT_INITIALIZED;
186
187 AddMountInfo* info = new AddMountInfo;
188 info->m_Priority = priority;
189 info->m_NameHash = name_hash;
190 info->m_Uri = strdup(uri);
191 info->m_Callback = callback;
192 info->m_CallbackData = callback_data;
193
194 bool res = dmLiveUpdate::PushAsyncJob((FJobProcess)AddMountProcess, (FJobCallback)AddMountFinished, (void*)&g_LiveUpdate, info);
195 return res == true ? RESULT_OK : RESULT_INVALID_RESOURCE;
196 }
197
198 Result RemoveMountSync(dmhash_t name_hash)
199 {

Callers 1

Resource_AddMountFunction · 0.85

Calls 3

IsLiveupdateEnabledFunction · 0.85
PushAsyncJobFunction · 0.85

Tested by

no test coverage detected