24
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
#include "ctsydelegates.h"
|
|
20 |
#include "cmmmessagemanagerbase.h"
|
|
21 |
#include <ctsy/tflogger.h>
|
|
22 |
|
|
23 |
// ======== MEMBER FUNCTIONS ========
|
|
24 |
|
|
25 |
CTsyDelegates* CTsyDelegates::NewL()
|
|
26 |
{
|
|
27 |
CTsyDelegates* tsyDelegates = new( ELeave ) CTsyDelegates();
|
|
28 |
return tsyDelegates;
|
|
29 |
}
|
|
30 |
|
|
31 |
CTsyDelegates::CTsyDelegates()
|
|
32 |
{
|
|
33 |
}
|
|
34 |
|
|
35 |
CTsyDelegates::~CTsyDelegates()
|
|
36 |
{
|
|
37 |
}
|
|
38 |
// ---------------------------------------------------------------------------
|
|
39 |
// CTsyDelegates::GetTsyObject
|
|
40 |
// Returns pointer requested TSY object
|
|
41 |
// (other items were commented in a header).
|
|
42 |
// ---------------------------------------------------------------------------
|
|
43 |
//
|
|
44 |
CBase* CTsyDelegates::GetTsyObject(
|
|
45 |
CMmMessageManagerBase::TTsyObjects aObject )
|
|
46 |
{
|
|
47 |
TFLOGSTRING2("TSY: CTsyDelegates::GetTsyObject object=%d", aObject );
|
|
48 |
|
|
49 |
CBase* object = NULL;
|
|
50 |
object = iTsyObjectArray.At( aObject );
|
|
51 |
return object ;
|
|
52 |
}
|
|
53 |
|
|
54 |
// ---------------------------------------------------------------------------
|
|
55 |
// CTsyDelegates::RegisterTsyObject
|
|
56 |
// Registers a Tsy object for request and notification completions
|
|
57 |
// (other items were commented in a header).
|
|
58 |
// ---------------------------------------------------------------------------
|
|
59 |
//
|
|
60 |
void CTsyDelegates::RegisterTsyObject(
|
|
61 |
CMmMessageManagerBase::TTsyObjects aTsyObjectType,
|
|
62 |
CBase* aTsyObject )
|
|
63 |
{
|
|
64 |
TFLOGSTRING3("TSY: CTsyDelegates::RegisterTsyObject type=%d address=0x%x", TInt( aTsyObjectType ), aTsyObject );
|
|
65 |
|
|
66 |
iTsyObjectArray[ aTsyObjectType ] = aTsyObject;
|
|
67 |
}
|
|
68 |
|
|
69 |
// ---------------------------------------------------------------------------
|
|
70 |
// CTsyDelegates::DeregisterTsyObject
|
|
71 |
// Remove previously registered Tsy object from the array.
|
|
72 |
// (other items were commented in a header).
|
|
73 |
// ---------------------------------------------------------------------------
|
|
74 |
//
|
|
75 |
void CTsyDelegates::DeregisterTsyObject( CBase* aTsyObject )
|
|
76 |
{
|
|
77 |
TFLOGSTRING2("TSY: CTsyDelegates::DeregisterTsyObject address=0x%x", aTsyObject );
|
|
78 |
|
|
79 |
for( TInt i = 0; i < TInt(
|
|
80 |
CMmMessageManagerBase::EMaxNumOfTsyObjects ); i++ )
|
|
81 |
{
|
|
82 |
if( iTsyObjectArray[ i ] == aTsyObject )
|
|
83 |
{
|
|
84 |
iTsyObjectArray[ i ] = 0;
|
|
85 |
break;
|
|
86 |
}
|
|
87 |
}
|
|
88 |
}
|
|
89 |
|
|
90 |
|
|
91 |
// End of File
|