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