static void error_callback(int iError, const char* description) { if ( GLApplication::IsValid() ) { GLApplicationEvents* pEvents = GLApplication::GetInstance().getEvents(); if ( pEvents != nullptr ) { FString sDescription( description ); pEvents->OnError( iError, sDescription ); } } }
void UserListModule_Impl::_departmentResponse(CImPdu* pdu) { CImPduClientDepartmentResponse* pResp = (CImPduClientDepartmentResponse*)pdu; client_department_info_t* pList = pResp->GetDepartmentList(); m_vecDepartment.reserve(pResp->GetDepartCnt()); for (UInt32 i = 0; i < pResp->GetDepartCnt(); i++) { module::DepartmentEntity depart; depart.dId = std::string(pList[i].depart_id_url, pList[i].depart_id_url_len); depart.dId = _makeDepartmentId(depart.dId); depart.parentDepartId = std::string(pList[i].parent_depart_id_url, pList[i].parent_depart_id_url_len); std::string sTitle(pList[i].title, pList[i].title_len); depart.title = util::stringToCString(sTitle); std::string sDescription(pList[i].description, pList[i].description_len); depart.description = util::stringToCString(sDescription); depart.status = pList[i].status; { util::TTAutoLock lock(&m_lock); m_vecDepartment.push_back(depart); } } }