0
|
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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
/**
|
|
20 |
@file
|
|
21 |
@internalComponent
|
|
22 |
*/
|
|
23 |
|
|
24 |
#include "comxilclockconfigmanager.h"
|
|
25 |
#include "comxilclockprocessingfunction.h"
|
|
26 |
#include "clocksupervisor.h"
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
COmxILClockConfigManager* COmxILClockConfigManager::NewL(
|
|
31 |
const TDesC8& aComponentName,
|
|
32 |
const OMX_VERSIONTYPE& aComponentVersion,
|
|
33 |
const RPointerArray<TDesC8>& aComponentRoleList,
|
|
34 |
COmxILClockProcessingFunction& aProcessingFunction)
|
|
35 |
{
|
|
36 |
COmxILClockConfigManager* self = new(ELeave) COmxILClockConfigManager(aProcessingFunction);
|
|
37 |
CleanupStack::PushL(self);
|
|
38 |
self->ConstructL(aComponentName, aComponentVersion, aComponentRoleList);
|
|
39 |
CleanupStack::Pop(self);
|
|
40 |
return self;
|
|
41 |
}
|
|
42 |
|
|
43 |
COmxILClockConfigManager::COmxILClockConfigManager(COmxILClockProcessingFunction& aProcessingFunction):
|
|
44 |
iProcessingFunction(&aProcessingFunction)
|
|
45 |
{
|
|
46 |
// nothing to do
|
|
47 |
}
|
|
48 |
|
|
49 |
void COmxILClockConfigManager::ConstructL(const TDesC8& aComponentName,
|
|
50 |
const OMX_VERSIONTYPE& aComponentVersion,
|
|
51 |
const RPointerArray<TDesC8>& aComponentRoleList)
|
|
52 |
{
|
|
53 |
COmxILConfigManager::ConstructL(aComponentName, aComponentVersion, aComponentRoleList);
|
|
54 |
}
|
|
55 |
|
|
56 |
COmxILClockConfigManager::~COmxILClockConfigManager()
|
|
57 |
{
|
|
58 |
}
|
|
59 |
|
|
60 |
OMX_ERRORTYPE COmxILClockConfigManager::GetConfig(OMX_INDEXTYPE aConfigIndex,
|
|
61 |
TAny* apComponentConfigStructure) const
|
|
62 |
{
|
|
63 |
OMX_ERRORTYPE error = iProcessingFunction->ProduceRequest(aConfigIndex, CClockSupervisor::EGetConfig, apComponentConfigStructure);
|
|
64 |
if(error != OMX_ErrorUnsupportedIndex)
|
|
65 |
{
|
|
66 |
return error;
|
|
67 |
}
|
|
68 |
|
|
69 |
// try base class if PF did not support the index
|
|
70 |
return COmxILConfigManager::GetConfig(aConfigIndex, apComponentConfigStructure);
|
|
71 |
}
|
|
72 |
|
|
73 |
OMX_ERRORTYPE COmxILClockConfigManager::SetConfig(OMX_INDEXTYPE aConfigIndex,
|
|
74 |
const TAny* apComponentConfigStructure)
|
|
75 |
{
|
|
76 |
OMX_ERRORTYPE error = iProcessingFunction->ProduceRequest(aConfigIndex, CClockSupervisor::ESetConfig, const_cast<TAny*>(apComponentConfigStructure));
|
|
77 |
if(error != OMX_ErrorUnsupportedIndex)
|
|
78 |
{
|
|
79 |
return error;
|
|
80 |
}
|
|
81 |
|
|
82 |
// try base class if PF did not support the index
|
|
83 |
return COmxILConfigManager::SetConfig(aConfigIndex, apComponentConfigStructure);
|
|
84 |
}
|
|
85 |
|