sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
#include "liboil_wsd_solutions.h"
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifdef EMULATOR
|
sl@0
|
23 |
|
sl@0
|
24 |
#include <e32std.h>
|
sl@0
|
25 |
#include <pls.h> // For emulator WSD API
|
sl@0
|
26 |
|
sl@0
|
27 |
const TUid KLibOilUid3 = {0x2001101E}; // This is the UID of the library
|
sl@0
|
28 |
|
sl@0
|
29 |
extern "C" struct liboil_global_struct *liboil_ImpurePtr()
|
sl@0
|
30 |
{
|
sl@0
|
31 |
|
sl@0
|
32 |
#if defined(__WINSCW__) || defined(__WINS__)
|
sl@0
|
33 |
|
sl@0
|
34 |
// Access the PLS of this process
|
sl@0
|
35 |
struct liboil_global_struct* p = Pls<struct liboil_global_struct>(KLibOilUid3, &liboil_Init);
|
sl@0
|
36 |
return p;
|
sl@0
|
37 |
|
sl@0
|
38 |
#else
|
sl@0
|
39 |
|
sl@0
|
40 |
return NULL;
|
sl@0
|
41 |
|
sl@0
|
42 |
#endif
|
sl@0
|
43 |
|
sl@0
|
44 |
|
sl@0
|
45 |
|
sl@0
|
46 |
}
|
sl@0
|
47 |
|
sl@0
|
48 |
int liboil_Init(liboil_global_struct *g)
|
sl@0
|
49 |
{
|
sl@0
|
50 |
#if defined(__WINSCW__) || defined(__WINS__)
|
sl@0
|
51 |
if(g)
|
sl@0
|
52 |
{
|
sl@0
|
53 |
//g->GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g) = NULL;
|
sl@0
|
54 |
g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).func = NULL;
|
sl@0
|
55 |
g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).name = "abs_f32_f32";
|
sl@0
|
56 |
g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).desc = NULL;
|
sl@0
|
57 |
g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).test_func = NULL;
|
sl@0
|
58 |
g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).first_impl = NULL;
|
sl@0
|
59 |
g->GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g).reference_impl = NULL;
|
sl@0
|
60 |
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
|
61 |
|
sl@0
|
62 |
return 0;
|
sl@0
|
63 |
}
|
sl@0
|
64 |
return 1;
|
sl@0
|
65 |
#else
|
sl@0
|
66 |
|
sl@0
|
67 |
return 1;
|
sl@0
|
68 |
|
sl@0
|
69 |
#endif
|
sl@0
|
70 |
}
|
sl@0
|
71 |
|
sl@0
|
72 |
extern "C" void _liboil_wsd_reset()
|
sl@0
|
73 |
{
|
sl@0
|
74 |
struct liboil_global_struct* p = Pls<struct liboil_global_struct>(KLibOilUid3, &liboil_Init);
|
sl@0
|
75 |
if(p)
|
sl@0
|
76 |
{
|
sl@0
|
77 |
memset(p,0,sizeof(struct liboil_global_struct));
|
sl@0
|
78 |
liboil_Init(p);
|
sl@0
|
79 |
}
|
sl@0
|
80 |
}
|
sl@0
|
81 |
|
sl@0
|
82 |
#endif // EMULATOR
|
sl@0
|
83 |
|
sl@0
|
84 |
|