sl@0: /* sl@0: * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #include "liboil_wsd_solutions.h" sl@0: sl@0: #ifdef EMULATOR sl@0: sl@0: #include sl@0: #include // For emulator WSD API sl@0: sl@0: const TUid KLibOilUid3 = {0x2001101E}; // This is the UID of the library sl@0: sl@0: extern "C" struct liboil_global_struct *liboil_ImpurePtr() sl@0: { sl@0: sl@0: #if defined(__WINSCW__) || defined(__WINS__) sl@0: sl@0: // Access the PLS of this process sl@0: struct liboil_global_struct* p = Pls(KLibOilUid3, &liboil_Init); sl@0: return p; sl@0: sl@0: #else sl@0: sl@0: return NULL; sl@0: sl@0: #endif sl@0: sl@0: sl@0: sl@0: } sl@0: sl@0: int liboil_Init(liboil_global_struct *g) sl@0: { sl@0: #if defined(__WINSCW__) || defined(__WINS__) sl@0: if(g) sl@0: { sl@0: //g->GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g) = NULL; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).func = NULL; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).name = "abs_f32_f32"; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).desc = NULL; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).test_func = NULL; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).first_impl = NULL; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).reference_impl = NULL; sl@0: g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).prototype = "uint8_t *dest, int dstr, int8_t *src, int sstr, int n" ; sl@0: sl@0: return 0; sl@0: } sl@0: return 1; sl@0: #else sl@0: sl@0: return 1; sl@0: sl@0: #endif sl@0: } sl@0: sl@0: extern "C" void _liboil_wsd_reset() sl@0: { sl@0: struct liboil_global_struct* p = Pls(KLibOilUid3, &liboil_Init); sl@0: if(p) sl@0: { sl@0: memset(p,0,sizeof(struct liboil_global_struct)); sl@0: liboil_Init(p); sl@0: } sl@0: } sl@0: sl@0: #endif // EMULATOR sl@0: sl@0: