|
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 subscription implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CSEARCHSUBSCRIPTIONITEM_H |
|
19 #define CSEARCHSUBSCRIPTIONITEM_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "ximpsubscriptionitembase.h" |
|
23 #include "searchtypehelpers.h" |
|
24 |
|
25 |
|
26 class MXIMPItemParentBase; |
|
27 class MXIMPPscContext; |
|
28 class CXIMPPscContext; |
|
29 |
|
30 class CSearchInfoImp; |
|
31 class MSearchInfo; |
|
32 /** |
|
33 * search subscription implementation |
|
34 * |
|
35 * @lib searchdatamodel.dll |
|
36 */ |
|
37 class CSearchSubscriptionItem : public CXIMPSubscriptionItemBase |
|
38 { |
|
39 |
|
40 public: // Construction and destruction |
|
41 |
|
42 /** |
|
43 * Construction |
|
44 * @param aParent. Parent has to be informed when this object is deleted by RemoveMe method. |
|
45 */ |
|
46 static CSearchSubscriptionItem* NewLC( MXIMPItemParentBase& aParent ); |
|
47 |
|
48 /** |
|
49 * Destruction |
|
50 * - Remember to inform parent about delete. |
|
51 */ |
|
52 IMPORT_C virtual ~CSearchSubscriptionItem(); |
|
53 |
|
54 private: // Construction and destruction |
|
55 |
|
56 /** |
|
57 * Construction |
|
58 * @param aParent. Parent has to be informed when this object is deleted by RemoveMe method. |
|
59 */ |
|
60 CSearchSubscriptionItem( MXIMPItemParentBase& aParent ); |
|
61 |
|
62 /** |
|
63 * Construction |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 public: // New methods |
|
68 |
|
69 /** |
|
70 * Set the search results takes ownership and given to search event |
|
71 */ |
|
72 IMPORT_C void SetSearchResults(RSearchInfoImpArray* aSearchResults); |
|
73 /** |
|
74 * Set the search id takes ownership and given to search event |
|
75 */ |
|
76 IMPORT_C void SetSearchIdL( CXIMPIdentityImp& aSearchId ); |
|
77 |
|
78 public: // From MXIMPSubscriptionItem |
|
79 |
|
80 /** |
|
81 * @see MXIMPSubscriptionItem |
|
82 */ |
|
83 void SynthesiseSubscriptionEventToL( MXIMPPscContext* aContext, TBool aForceEvent ); |
|
84 private: // From CXIMPIMSubscriptionItemBase |
|
85 |
|
86 /** |
|
87 * @see CXIMPIMSubscriptionItemBase |
|
88 */ |
|
89 void CleanExpired(); |
|
90 |
|
91 private : |
|
92 /** |
|
93 * Search info array :Not owned |
|
94 */ |
|
95 |
|
96 RSearchInfoImpArray* iSearchResults; |
|
97 |
|
98 /** |
|
99 * identity :Not owned |
|
100 */ |
|
101 CXIMPIdentityImp* iSearchId ; |
|
102 |
|
103 }; |
|
104 |
|
105 |
|
106 /* ======================================================================== */ |
|
107 |
|
108 |
|
109 |
|
110 #endif // CPSCSearchSUBSCRIPTIONITEM_H |