1 /* |
|
2 * Copyright (c) 2005 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 //#include <jutils.h> |
|
19 #include <logger.h> |
|
20 |
|
21 #include <mmafunctionserver.h> |
|
22 |
|
23 // Generated JNI header. |
|
24 #include "com_nokia_amms_control_VolumeControl.h" |
|
25 |
|
26 #include "cammsvolumecontrolgroup.h" |
|
27 |
|
28 /** |
|
29 * Calls CAMMSVolumeControlGroup::SetLevelL method. |
|
30 * @param aVolumeControl CAMMSVolumeControlGroup instance. |
|
31 * @param aLevel Level to set. |
|
32 */ |
|
33 LOCAL_C void SetVolumeL(CAMMSVolumeControlGroup* aVolumeControl, TInt aLevel) |
|
34 { |
|
35 aVolumeControl->SetVolumeL(aLevel); |
|
36 } |
|
37 |
|
38 /** |
|
39 * JNI function. |
|
40 */ |
|
41 JNIEXPORT jint JNICALL Java_com_nokia_amms_control_VolumeControl__1setLevel |
|
42 (JNIEnv* /*aJniEnv*/, |
|
43 jclass, |
|
44 jint aEventSourceHandle, |
|
45 jint aControlHandle, |
|
46 jint aVolume) |
|
47 { |
|
48 LOG1( EJavaAMMS, EInfo, "AMMS::VolumeControl.cpp::setLevel level = %d", aVolume); |
|
49 MMAFunctionServer* eventSource = |
|
50 reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle); |
|
51 |
|
52 CAMMSVolumeControlGroup* control = |
|
53 reinterpret_cast< CAMMSVolumeControlGroup* >(aControlHandle); |
|
54 |
|
55 // call CAMMSVolumeControlGroup::SetVolumeL through local SetVolumeL function. |
|
56 return eventSource->ExecuteTrap(&SetVolumeL, |
|
57 control, |
|
58 aVolume); |
|
59 } |
|
60 |
|
61 // End of File |
|
62 |
|
63 |
|
64 |
|