|
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: JNI implementation of LAPIManager class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INTERNAL INCLUDES |
|
20 #include "com_nokia_mj_impl_location_LAPIManager.h" |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include "logger.h" |
|
24 #include "locationfunctionserver.h" |
|
25 |
|
26 /* |
|
27 * Class: com_nokia_mj_impl_location_LAPIManager |
|
28 * Method: _createFunctionSource |
|
29 * Signature: (I)I |
|
30 */ |
|
31 JNIEXPORT jint |
|
32 JNICALL Java_com_nokia_mj_impl_location_LAPIManager__1createFunctionSource( |
|
33 JNIEnv* aJniEnv, |
|
34 jobject aPeer) |
|
35 { |
|
36 JELOG2(EJavaLocation); |
|
37 java::location::LocationFunctionServer* mFunctionServer; |
|
38 mFunctionServer = new java::location::LocationFunctionServer(*aJniEnv, |
|
39 aPeer); |
|
40 return reinterpret_cast<jint>(mFunctionServer); |
|
41 } |
|
42 |
|
43 /* |
|
44 * Class: com_nokia_mj_impl_location_LAPIManager |
|
45 * Method: _dispose |
|
46 * Signature: (I)V |
|
47 */ |
|
48 JNIEXPORT void |
|
49 JNICALL Java_com_nokia_mj_impl_location_LAPIManager__1dispose( |
|
50 JNIEnv* , |
|
51 jobject /*aPeer*/, |
|
52 jint aEventSourceHandle) |
|
53 { |
|
54 JELOG2(EJavaLocation); |
|
55 LOG(EJavaLocation, EInfo, |
|
56 "Java_com_nokia_mj_impl_location_LAPIManager__1dispose() called."); |
|
57 |
|
58 java::location::LocationFunctionServer* mFunctionServer = |
|
59 reinterpret_cast< java::location::LocationFunctionServer*>( |
|
60 aEventSourceHandle); |
|
61 |
|
62 delete mFunctionServer; |
|
63 } |
|
64 |
|
65 // End of file |