void CAsyncHttp::cancelRequest(const char* szCallback) { if (!szCallback || !*szCallback ) { LOG(INFO) + "Cancel callback should not be empty. Use * for cancel all"; return; } synchronized(getCommandLock()); CHttpCommand* pCmd = (CHttpCommand*)getCurCommand(); if ( pCmd != null && ( *szCallback == '*' || pCmd->m_strCallback.compare(szCallback) == 0) ) pCmd->cancel(); if ( *szCallback == '*' ) getCommands().clear(); else { for (int i = getCommands().size()-1; i >= 0; i--) { CHttpCommand* pCmd1 = (CHttpCommand*)getCommands().get(i); if ( pCmd1 != null && pCmd1->m_strCallback.compare(szCallback) == 0 ) getCommands().remove(i); } } }
BUCommand* getCurrentBUCommand() { return (BUCommand*)getCurCommand(); }