equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
45 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
46 // |
46 // |
47 void CSysApRemConObserver::ConstructL() |
47 void CSysApRemConObserver::ConstructL() |
48 { |
48 { |
49 TRACES( RDebug::Print( _L("CSysApRemConObserver::ConstructL") ) ); |
49 TRACES( RDebug::Print( _L("CSysApRemConObserver::ConstructL") ) ); |
50 |
|
51 iInterfaceSelector = CRemConInterfaceSelector::NewL(); |
|
52 |
|
53 iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this ); |
|
54 |
|
55 iInterfaceSelector->OpenTargetL(); |
|
56 } |
50 } |
57 |
51 |
58 // ----------------------------------------------------------------------------- |
52 // ----------------------------------------------------------------------------- |
59 // CSysApRemConObserver::NewL |
53 // CSysApRemConObserver::NewL |
60 // Two-phased constructor. |
54 // Two-phased constructor. |
79 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
80 // |
74 // |
81 CSysApRemConObserver::~CSysApRemConObserver() |
75 CSysApRemConObserver::~CSysApRemConObserver() |
82 { |
76 { |
83 TRACES( RDebug::Print( _L("CSysApRemConObserver::~CSysApRemConObserver") ) ); |
77 TRACES( RDebug::Print( _L("CSysApRemConObserver::~CSysApRemConObserver") ) ); |
84 delete iInterfaceSelector; // Internally deletes iCoreTarget |
|
85 } |
78 } |
86 |
79 |
87 // ----------------------------------------------------------------------------- |
80 // ----------------------------------------------------------------------------- |
88 // CSysApRemConObserver::MrccatoCommand |
81 // CSysApRemConObserver::MrccatoCommand |
89 // Handles remote key event |
82 // Handles remote key event |
110 } |
103 } |
111 } |
104 } |
112 } |
105 } |
113 } |
106 } |
114 |
107 |
|
108 /** |
|
109 * Reserve the volume keys |
|
110 */ |
|
111 void CSysApRemConObserver::StartRemconInterface() |
|
112 { |
|
113 TRACES( RDebug::Print( _L("CSysApRemConObserver::BlockKeys"))); |
|
114 if(!iInterfaceSelector) |
|
115 { |
|
116 iInterfaceSelector = CRemConInterfaceSelector::NewL(); |
|
117 iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this ); |
|
118 iInterfaceSelector->OpenTargetL(); |
|
119 } |
|
120 } |
|
121 |
|
122 /** |
|
123 * Release the volume keys for other application like phone app during call |
|
124 */ |
|
125 void CSysApRemConObserver::StopRemconInterface() |
|
126 { |
|
127 TRACES( RDebug::Print( _L("CSysApRemConObserver::UnBlockKeys"))); |
|
128 if(iInterfaceSelector) |
|
129 { |
|
130 delete iInterfaceSelector; |
|
131 iInterfaceSelector = NULL; |
|
132 } |
|
133 } |
|
134 |
115 // End of File |
135 // End of File |