|
1 /* |
|
2 * Copyright (c) 2007 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: Search Keys subscription implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <badesca.h> |
|
20 #include "ximpitemparentbase.h" |
|
21 #include "ximppanics.h" |
|
22 #include "ximppsccontext.h" |
|
23 #include "ximpobjecthelpers.h" |
|
24 |
|
25 #include "ximpidentityimp.h" |
|
26 #include "searchkeyssubscriptionitem.h" |
|
27 |
|
28 #include "searchitemparent.h" |
|
29 #include "searchkeyseventimp.h" |
|
30 // --------------------------------------------------------------------------- |
|
31 // CSearchKeysSubscriptionItem::CSearchKeysSubscriptionItem() |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 CSearchKeysSubscriptionItem::CSearchKeysSubscriptionItem( MXIMPItemParentBase& aParent ) |
|
35 : CXIMPSubscriptionItemBase( aParent ) |
|
36 { |
|
37 } |
|
38 |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // CSearchKeysSubscriptionItem::ConstructL() |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 void CSearchKeysSubscriptionItem::ConstructL() |
|
45 { |
|
46 } |
|
47 |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // CSearchKeysSubscriptionItem::NewL() |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 CSearchKeysSubscriptionItem* CSearchKeysSubscriptionItem::NewLC( MXIMPItemParentBase& aParent ) |
|
54 { |
|
55 CSearchKeysSubscriptionItem* self = new( ELeave ) CSearchKeysSubscriptionItem( aParent ); |
|
56 CleanupClosePushL( *self ); |
|
57 self->ConstructL(); |
|
58 return self; |
|
59 } |
|
60 |
|
61 |
|
62 // --------------------------------------------------------------------------- |
|
63 // CSearchKeysSubscriptionItem::~CSearchKeysSubscriptionItem() |
|
64 // --------------------------------------------------------------------------- |
|
65 // |
|
66 EXPORT_C CSearchKeysSubscriptionItem::~CSearchKeysSubscriptionItem() |
|
67 { |
|
68 |
|
69 MSearchItemParent* searchCache = static_cast<MSearchItemParent*> |
|
70 (iParent.GetInterface(SEARCH_ITEM_PARENT)); |
|
71 searchCache->RemoveMe( this ); |
|
72 |
|
73 } |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 // CSearchSubscriptionItem::SetKeyInfoArray() |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 EXPORT_C void CSearchKeysSubscriptionItem::SetKeyInfoArray(RSearchKeyInfoImpArray* aKeyInfoArray) |
|
80 { |
|
81 iKeyInfoArray = aKeyInfoArray; |
|
82 } |
|
83 |
|
84 // --------------------------------------------------------------------------- |
|
85 // From MXIMPSubscriptionItem class. |
|
86 // CSearchKeysSubscriptionItem::SynthesiseSubscriptionEventToL() |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 void CSearchKeysSubscriptionItem::SynthesiseSubscriptionEventToL( |
|
90 MXIMPPscContext* aContext, TBool /*aForceEvent*/ ) |
|
91 { |
|
92 |
|
93 CSearchKeysEventImp* newEvent = CSearchKeysEventImp::NewLC( iKeyInfoArray ); |
|
94 if( newEvent ) |
|
95 { |
|
96 MSearchItemParent* searchCache = static_cast<MSearchItemParent*>(iParent.GetInterface(SEARCH_ITEM_PARENT)); |
|
97 searchCache->AddEventL( *newEvent, aContext ); |
|
98 CleanupStack::PopAndDestroy( newEvent ); //newEvent |
|
99 } |
|
100 |
|
101 } |
|
102 |
|
103 |
|
104 |
|
105 // --------- ------------------------------------------------------------------ |
|
106 // CGroupListSubscriptionItem::CleanExpired() |
|
107 // --------------------------------------------------------------------------- |
|
108 // |
|
109 void CSearchKeysSubscriptionItem::CleanExpired() |
|
110 { |
|
111 |
|
112 } |
|
113 |
|
114 |
|
115 // End of file |