|
1 /* |
|
2 * Copyright (c) 2002 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 <jutils.h> |
|
20 |
|
21 #include "com_nokia_amms_control_audio3d_CommitControl.h" |
|
22 #include <cmmaeventsource.h> |
|
23 #include "cammscommitcontrolgroup.h" |
|
24 |
|
25 /** |
|
26 * wrapper for CAMMSCommitControlGroup::CommitAllControlsL() |
|
27 */ |
|
28 static void CommitL(CAMMSCommitControlGroup* aControl) |
|
29 { |
|
30 aControl->CommitAllControlsL(); |
|
31 } |
|
32 |
|
33 /** |
|
34 * wrapper for CAMMSCommitControlGroup::SetDeferredL() |
|
35 */ |
|
36 static void SetDeferredL(CAMMSCommitControlGroup* aControl, TBool aDeferred) |
|
37 { |
|
38 aControl->SetDeferredL(aDeferred); |
|
39 } |
|
40 |
|
41 /* |
|
42 * Class: com_nokia_amms_control_audio3d_CommitControl |
|
43 * Method: _commit |
|
44 * Signature: (III)I |
|
45 */ |
|
46 JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audio3d_CommitControl__1commit( |
|
47 JNIEnv*, |
|
48 jclass, |
|
49 jint aEventSource, |
|
50 jint aCommitControl) |
|
51 { |
|
52 CMMAEventSource* eventSource = |
|
53 JavaUnhand< CMMAEventSource >(aEventSource); |
|
54 |
|
55 CAMMSCommitControlGroup* commitControl = |
|
56 static_cast<CAMMSCommitControlGroup*>( |
|
57 JavaUnhand< CAMMSControlGroup >(aCommitControl)); |
|
58 |
|
59 TInt error; |
|
60 error = eventSource->ExecuteTrap(&CommitL, commitControl); |
|
61 |
|
62 return error; |
|
63 } |
|
64 |
|
65 /* |
|
66 * Class: com_nokia_amms_control_audio3d_CommitControl |
|
67 * Method: _setDeferred |
|
68 * Signature: (IIZ)V |
|
69 */ |
|
70 JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audio3d_CommitControl__1setDeferred( |
|
71 JNIEnv*, |
|
72 jclass, |
|
73 jint aEventSource, |
|
74 jint aCommitControl, |
|
75 jboolean aDeferred) |
|
76 { |
|
77 CMMAEventSource* eventSource = |
|
78 JavaUnhand< CMMAEventSource >(aEventSource); |
|
79 |
|
80 CAMMSCommitControlGroup* commitControl = |
|
81 static_cast<CAMMSCommitControlGroup*>( |
|
82 JavaUnhand< CAMMSControlGroup >(aCommitControl)); |
|
83 |
|
84 TInt error; |
|
85 error = eventSource->ExecuteTrap(&SetDeferredL, commitControl, |
|
86 (TBool) aDeferred); |
|
87 |
|
88 return error; |
|
89 } |
|
90 |
|
91 // End of File |