/**************************************************************************//** * @brief Set callback function address for encode * @param[in] InterruptSource Interrput source data struct address * @param[in] Caller ospl caller data address * @retval error code ******************************************************************************/ errnum_t R_wrpper_LocalDecodeCallback(const r_ospl_interrupt_t *InterruptSource, const r_ospl_caller_t *Caller) { errnum_t e = 0; const jcu_async_status_t* status; jcu_image_info_t image_info; jcu_errorcode_t jcu_error; e = R_JCU_OnInterruptDefault(InterruptSource, Caller); if (e != 0) { SetCallback(MBED_JCU_E_JCU_ERR); goto fin; } R_JCU_GetAsyncStatus( &status ); if (status -> IsPaused == true) { if ((status->SubStatusFlags & JCU_SUB_INFOMATION_READY) == 0) { e = E_OTHERS; SetCallback(MBED_JCU_E_FORMA_ERR); goto fin; } R_JCU_GetImageInfo( &image_info ); if ((image_info.width == 0u) || (image_info.height == 0u) || (image_info.width > DecodeWidth) || (image_info.height > DecodeHeight)) { e = E_OTHERS; SetCallback(MBED_JCU_E_FORMA_ERR); goto fin; } if ((image_info.encodedFormat != JCU_JPEG_YCbCr444) && (image_info.encodedFormat != JCU_JPEG_YCbCr422) && (image_info.encodedFormat != JCU_JPEG_YCbCr420) && (image_info.encodedFormat != JCU_JPEG_YCbCr411)) { e = E_OTHERS; SetCallback(MBED_JCU_E_FORMA_ERR); goto fin; } jcu_error = R_JCU_ContinueAsync(JCU_IMAGE_INFO, &Async); if (jcu_error != JCU_ERROR_OK) { e = E_OTHERS; SetCallback(MBED_JCU_E_JCU_ERR); goto fin; } } else { SetCallback(MBED_JCU_E_OK); } fin: return e; }
void CMessageBoxScene::OnOkExitGame() { SetCallback(CloseWinOnOkCb, this); }
void CMessageBoxScene::OnOkCloseScene(CScene* pTgt) { SetCallback(ExitSceneOnOkCb, pTgt); }
UMXSendThread::UMXSendThread(Radio * radio, IThreadControl * threadCallback) { this->reader = 0; SetCallback(threadCallback); }
// // Obtains target URL and referer from the specified request handle and HTTP headers string. // Checks URL and referer and creates handle context if needed. // Adds "Accept-Encoding: identity" header. // static LPSTR IeCreateContextModifyHeadersA( HINTERNET hRequest, LPSTR lpszHeaders, DWORD dwHeadersLength, LPSTR* ppHeaders, PHANDLE_CONTEXT* pCtx ) { LPSTR NewHeaders = NULL, pHeaders = NULL, pReferer = NULL; ULONG Len; CHAR OldChar; PHANDLE_CONTEXT Ctx = NULL; // Check if we already have a context for the specified handle if (!(Ctx = FindHandle(hRequest))) { if (lpszHeaders) { if (dwHeadersLength == -1) Len = lstrlenA(lpszHeaders); else Len = dwHeadersLength; if (pHeaders = hAlloc(Len + sizeof(CHAR))) { memcpy(pHeaders, lpszHeaders, Len); pHeaders[Len] = 0; } } // if (lpszHeaders) else pHeaders = TaransferGetRequestHeaders(hRequest); if (pHeaders) { if (pReferer = HttpFindHeaderA(pHeaders, szReferer, &Len)) { OldChar = pReferer[Len]; pReferer[Len] = 0; } } // if (pHeaders) if (ppHeaders) *ppHeaders = pHeaders; // Creating a context for the handle if (Ctx = IeCheckAddHandle(hRequest, pReferer)) SetCallback(hRequest, Ctx); if (pReferer) pReferer[Len] = OldChar; } // if (!(Ctx = IeGetContext(hRequest))) else ReleaseHandle(Ctx); if (Ctx) { if ((lpszHeaders) && (dwHeadersLength == -1)) // Setting "Accept-Encoding: identity" header NewHeaders = HttpSetHeaderA(lpszHeaders, szAcceptEncoding, szIdentity, NULL); } if (pCtx) *pCtx = Ctx; return(NewHeaders); }
void VDUIBaseWindowW32::Shutdown() { DispatchEvent(this, mID, IVDUICallback::kEventDestroy, 0); SetCallback(NULL, false); VDUICustomControlW32::Shutdown(); }
bool CConEmuUpdate::wininet::Init(CConEmuUpdate* apUpd) { // Already initialized? if (hDll) { _ASSERTE(DownloadCommand!=NULL); // But check if local objects are created... if (!DownloadCommand(dc_Init, 0, NULL)) { DWORD nErr = GetLastError(); // No use? pUpd->ReportError(L"Failed to re-inialize gpInet, code=%u", nErr); return false; } return true; } pUpd = apUpd; bool bRc = false; wchar_t* pszLib = lstrmerge(gpConEmu->ms_ConEmuBaseDir, WIN3264TEST(L"\\ConEmuCD.dll",L"\\ConEmuCD64.dll")); HMODULE lhDll = pszLib ? LoadLibrary(pszLib) : NULL; DownloadCommand_t lDownloadCommand = NULL; if (!lhDll) { _ASSERTE(lhDll!=NULL); lhDll = LoadLibrary(WIN3264TEST(L"ConEmuCD.dll",L"ConEmuCD64.dll")); } if (!lhDll) { DWORD nErr = GetLastError(); pUpd->ReportError(L"Required library '%s' was not loaded, code=%u", WIN3264TEST(L"ConEmuCD.dll",L"ConEmuCD64.dll"), nErr); goto wrap; } lDownloadCommand = (DownloadCommand_t)GetProcAddress(lhDll, "DownloadCommand"); if (!lDownloadCommand) { pUpd->ReportError(L"Exported function DownloadCommand in '%s' not found! Check your installation!", WIN3264TEST(L"ConEmuCD.dll",L"ConEmuCD64.dll"), GetLastError()); goto wrap; } if (!lDownloadCommand(dc_Init, 0, NULL)) { DWORD nErr = GetLastError(); // No use? pUpd->ReportError(L"Failed to inialize gpInet, code=%u", nErr); goto wrap; } hDll = lhDll; DownloadCommand = lDownloadCommand; SetCallback(dc_ErrCallback, ErrorCallback, (LPARAM)apUpd); SetCallback(dc_LogCallback, (gpSetCls && gpSetCls->isAdvLogging)?LogCallback:NULL, (LPARAM)apUpd); bRc = true; wrap: SafeFree(pszLib); if (lhDll && !bRc) { FreeLibrary(lhDll); } return bRc; }
void ILayout::SetCallback( AString strFunction,VoidCallVoid p ){ SetCallback(Converter::Acsi2WideByte(strFunction),p); }