1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/liboil/src/liboil_wsd.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,84 @@
1.4 +/*
1.5 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#include "liboil_wsd_solutions.h"
1.24 +
1.25 +#ifdef EMULATOR
1.26 +
1.27 +#include <e32std.h>
1.28 +#include <pls.h> // For emulator WSD API
1.29 +
1.30 +const TUid KLibOilUid3 = {0x2001101E}; // This is the UID of the library
1.31 +
1.32 +extern "C" struct liboil_global_struct *liboil_ImpurePtr()
1.33 +{
1.34 +
1.35 +#if defined(__WINSCW__) || defined(__WINS__)
1.36 +
1.37 + // Access the PLS of this process
1.38 + struct liboil_global_struct* p = Pls<struct liboil_global_struct>(KLibOilUid3, &liboil_Init);
1.39 + return p;
1.40 +
1.41 +#else
1.42 +
1.43 + return NULL;
1.44 +
1.45 +#endif
1.46 +
1.47 +
1.48 +
1.49 +}
1.50 +
1.51 +int liboil_Init(liboil_global_struct *g)
1.52 +{
1.53 +#if defined(__WINSCW__) || defined(__WINS__)
1.54 + if(g)
1.55 + {
1.56 + //g->GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g) = NULL;
1.57 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).func = NULL;
1.58 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).name = "abs_f32_f32";
1.59 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).desc = NULL;
1.60 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).test_func = NULL;
1.61 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).first_impl = NULL;
1.62 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).reference_impl = NULL;
1.63 + g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).prototype = "uint8_t *dest, int dstr, int8_t *src, int sstr, int n" ;
1.64 +
1.65 + return 0;
1.66 + }
1.67 + return 1;
1.68 +#else
1.69 +
1.70 + return 1;
1.71 +
1.72 +#endif
1.73 +}
1.74 +
1.75 +extern "C" void _liboil_wsd_reset()
1.76 +{
1.77 + struct liboil_global_struct* p = Pls<struct liboil_global_struct>(KLibOilUid3, &liboil_Init);
1.78 + if(p)
1.79 + {
1.80 + memset(p,0,sizeof(struct liboil_global_struct));
1.81 + liboil_Init(p);
1.82 + }
1.83 +}
1.84 +
1.85 +#endif // EMULATOR
1.86 +
1.87 +