equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2010 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 #include "com_nokia_mj_impl_javacontrolpanel_Redirector.h" |
|
20 #include "logger.h" |
|
21 #ifdef __SYMBIAN32__ |
|
22 #include "logredirector.h" |
|
23 #endif |
|
24 |
|
25 /* |
|
26 * Class: com_nokia_mj_impl_javacontrolpanel_Redirector |
|
27 * Method: _start |
|
28 * Signature: ()I |
|
29 */ |
|
30 JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_javacontrolpanel_Redirector__1start |
|
31 (JNIEnv *, jobject) |
|
32 { |
|
33 #ifdef __SYMBIAN32__ |
|
34 LogRedirector* redirector = new LogRedirector(); |
|
35 redirector->start(); |
|
36 return (jint)redirector; |
|
37 #else |
|
38 return 0; |
|
39 #endif |
|
40 } |
|
41 |
|
42 /* |
|
43 * Class: com_nokia_mj_impl_javacontrolpanel_Redirector |
|
44 * Method: _stop |
|
45 * Signature: (I)V |
|
46 */ |
|
47 JNIEXPORT void JNICALL Java_com_nokia_mj_impl_javacontrolpanel_Redirector__1stop |
|
48 (JNIEnv *, jobject, jint aHandle) |
|
49 { |
|
50 #ifdef __SYMBIAN32__ |
|
51 LogRedirector* redirector = reinterpret_cast<LogRedirector*>(aHandle); |
|
52 redirector->stop(); |
|
53 delete redirector; |
|
54 #endif |
|
55 } |
|