MCPcopy Create free account
hub / github.com/OSGeo/gdal / CPLHTTPPushFetchCallback

Function CPLHTTPPushFetchCallback

port/cpl_http.cpp:992–1000  ·  view source on GitHub ↗

Installs an alternate callback to the default implementation of * CPLHTTPFetchEx(). * * This callback will only be used in the thread where this function has been * called. It must be un-installed by CPLHTTPPopFetchCallback(), which must also * be called from the same thread. * * @param pFunc Callback function to be called with CPLHTTPFetchEx() is called. * @param pUserData Last argument t

Source from the content-addressed store, hash-verified

990 * @since GDAL 3.2
991 */
992int CPLHTTPPushFetchCallback(CPLHTTPFetchCallbackFunc pFunc, void *pUserData)
993{
994 auto psCtx = GetHTTPFetchContext(true);
995 if (psCtx == nullptr)
996 return false;
997 psCtx->stack.emplace_back(
998 std::pair<CPLHTTPFetchCallbackFunc, void *>(pFunc, pUserData));
999 return true;
1000}
1001
1002/************************************************************************/
1003/* CPLHTTPPopFetchCallback() */

Callers 1

TEST_FFunction · 0.85

Calls 1

GetHTTPFetchContextFunction · 0.85

Tested by 1

TEST_FFunction · 0.68