51
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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: searchdata host
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#include <ximpprotocolconnection.h>
|
|
21 |
#include <protocolimfeatures.h>
|
|
22 |
#include <searchobjectfactory.h>
|
|
23 |
#include <protocolsearchfeaturedatahost.h>
|
|
24 |
#include "ximpapiobjbase.h"
|
|
25 |
#include "searchapiobjbase.h"
|
|
26 |
#include "searchobjectfactoryimp.h"
|
|
27 |
#include "searchdatacacheimp.h"
|
|
28 |
#include "protocolsearchdatahostimp.h"
|
|
29 |
#include "protocolsearchfeaturedatahostimp.h"
|
|
30 |
|
|
31 |
#include "searchlogutils.h"
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
// ======== MEMBER FUNCTIONS ========
|
|
37 |
|
|
38 |
|
|
39 |
// This should be variated. Branding variation can be one
|
|
40 |
// possibility. One is to leave adaptation deside how soon
|
|
41 |
// cleanup will be done.
|
|
42 |
// Now 5 sec used for testing purposes. Better value could be
|
|
43 |
// some minutes.
|
|
44 |
|
|
45 |
// ---------------------------------------------------------------------------
|
|
46 |
// CProtocolSearchDataHostImp::CProtocolSearchDataHostImp()
|
|
47 |
// ---------------------------------------------------------------------------
|
|
48 |
//
|
|
49 |
CProtocolSearchDataHostImp::CProtocolSearchDataHostImp( MXIMPHost& aHost )
|
|
50 |
:iHost( aHost )
|
|
51 |
{
|
|
52 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::CProtocolSearchDataHostImp Started"));
|
|
53 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::CProtocolSearchDataHostImp Completed"));
|
|
54 |
}
|
|
55 |
|
|
56 |
|
|
57 |
// ---------------------------------------------------------------------------
|
|
58 |
// CProtocolSearchDataHostImp::ConstructL()
|
|
59 |
// ---------------------------------------------------------------------------
|
|
60 |
//
|
|
61 |
void CProtocolSearchDataHostImp::ConstructL()
|
|
62 |
{
|
|
63 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::ConstructL Started"));
|
|
64 |
|
|
65 |
iSearchObjFactory= CSearchObjectFactoryImp::NewL();
|
|
66 |
iSrchFeatureDataHost=CProtocolSearchFeatureDataHostImp::NewL(iHost);
|
|
67 |
iSearchDataCache= CSearchDataCache::NewL(iHost);
|
|
68 |
|
|
69 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::ConstructL Completed"));
|
|
70 |
}
|
|
71 |
|
|
72 |
|
|
73 |
// ---------------------------------------------------------------------------
|
|
74 |
// CProtocolSearchDataHostImp::NewLC()
|
|
75 |
// ---------------------------------------------------------------------------
|
|
76 |
//
|
|
77 |
CProtocolSearchDataHostImp* CProtocolSearchDataHostImp::NewLC( MXIMPHost& aHost )
|
|
78 |
{
|
|
79 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::NewLC Started"));
|
|
80 |
CProtocolSearchDataHostImp* self = new( ELeave ) CProtocolSearchDataHostImp( aHost );
|
|
81 |
CleanupStack::PushL( self );
|
|
82 |
self->ConstructL();
|
|
83 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::NewLC Completed"));
|
|
84 |
return self;
|
|
85 |
|
|
86 |
}
|
|
87 |
|
|
88 |
// ---------------------------------------------------------------------------
|
|
89 |
// CProtocolSearchDataHostImp::NewL()
|
|
90 |
// ---------------------------------------------------------------------------
|
|
91 |
//
|
|
92 |
CProtocolSearchDataHostImp* CProtocolSearchDataHostImp::NewL( MXIMPHost& aHost )
|
|
93 |
{
|
|
94 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::NewL Started"));
|
|
95 |
CProtocolSearchDataHostImp* self = new( ELeave ) CProtocolSearchDataHostImp( aHost );
|
|
96 |
CleanupStack::PushL( self );
|
|
97 |
self->ConstructL();
|
|
98 |
CleanupStack::Pop( self );
|
|
99 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::NewL Completed"));
|
|
100 |
return self;
|
|
101 |
|
|
102 |
}
|
|
103 |
// ---------------------------------------------------------------------------
|
|
104 |
// CProtocolSearchDataHostImp::~CProtocolSearchDataHostImp()
|
|
105 |
// ---------------------------------------------------------------------------
|
|
106 |
//
|
|
107 |
CProtocolSearchDataHostImp::~CProtocolSearchDataHostImp()
|
|
108 |
{
|
|
109 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::~CProtocolSearchDataHostImp Started"));
|
|
110 |
delete iSearchDataCache;
|
|
111 |
delete iSrchFeatureDataHost;
|
|
112 |
delete iSearchObjFactory;
|
|
113 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::~CProtocolSearchDataHostImp Completed"));
|
|
114 |
}
|
|
115 |
|
|
116 |
|
|
117 |
// ---------------------------------------------------------------------------
|
|
118 |
// CProtocolSearchDataHostImp::ImObjectFactory()
|
|
119 |
// ---------------------------------------------------------------------------
|
|
120 |
//
|
|
121 |
MSearchObjectFactory& CProtocolSearchDataHostImp::SearchObjectFactory()
|
|
122 |
{
|
|
123 |
XSearchLogger::Log(_L("CProtocolSearchDataHostImp::SearchObjectFactory Started"));
|
|
124 |
return *iSearchObjFactory;
|
|
125 |
}
|
|
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
|
130 |
// ---------------------------------------------------------------------------
|
|
131 |
// CProtocolSearchDataHostImp::ConversationDataAccess()
|
|
132 |
// ---------------------------------------------------------------------------
|
|
133 |
//
|
|
134 |
MProtocolSearchFeatureDataHost& CProtocolSearchDataHostImp::SearchFeatureDataAccess()
|
|
135 |
{
|
|
136 |
return *iSrchFeatureDataHost;
|
|
137 |
}
|
|
138 |
// ---------------------------------------------------------------------------
|
|
139 |
// CProtocolSearchDataHostImp::ConversationDataAccess()
|
|
140 |
// ---------------------------------------------------------------------------
|
|
141 |
//
|
|
142 |
EXPORT_C CSearchDataCache& CProtocolSearchDataHostImp::SearchDataCache()
|
|
143 |
{
|
|
144 |
return *iSearchDataCache;
|
|
145 |
}
|
|
146 |
|
|
147 |
|
|
148 |
|
|
149 |
// End of file
|
|
150 |
|