|
1 /* |
|
2 * Copyright (c) 2002 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 * Data structure defintions for public WV Engine |
|
16 * Fundamental API. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef ImpsFundamental_H |
|
22 #define ImpsFundamental_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 //Supported search elements |
|
28 enum TImpsSearchElement |
|
29 { |
|
30 EImpsUserAlias, |
|
31 EImpsUserOnlineStatus, |
|
32 EImpsUserEmailAddress, |
|
33 EImpsUserFirstName, |
|
34 EImpsUserID, |
|
35 EImpsUserLastName, |
|
36 EImpsUserMobileNumber, |
|
37 EImpsGroupID, |
|
38 EImpsGroupName, |
|
39 EImpsGroupTopic, |
|
40 EImpsGroupUserIDJoined, |
|
41 EImpsGroupUserIDOwner |
|
42 }; |
|
43 |
|
44 /** |
|
45 * Search result element |
|
46 */ |
|
47 enum TImpsSearchResultType |
|
48 { |
|
49 EImpsUserResult, |
|
50 EImpsGroupResult |
|
51 }; |
|
52 |
|
53 // FORWARD DECLARATIONS |
|
54 class CImpsSearchRequest; |
|
55 |
|
56 // Remember to call ResetAndDestroy() to clean all the data in the array |
|
57 typedef CArrayPtrFlat<CImpsSearchRequest> CSearchPairs; |
|
58 |
|
59 class CImpsSearchRequest: public CBase |
|
60 { |
|
61 public: |
|
62 |
|
63 /** |
|
64 * Constructor. |
|
65 */ |
|
66 IMPORT_C static CImpsSearchRequest* NewL( ); |
|
67 |
|
68 /** |
|
69 * Set values. |
|
70 * This allocates memory and copies aValue to its internal data storage. |
|
71 * @param aElement search key |
|
72 * @param aValue search value |
|
73 */ |
|
74 IMPORT_C void SetRequestL( TImpsSearchElement aElement, |
|
75 const TDesC& aValue ); |
|
76 |
|
77 /** |
|
78 * Reset the object |
|
79 */ |
|
80 IMPORT_C void ResetL(); |
|
81 |
|
82 /** |
|
83 * Returns the value of the object |
|
84 * @return TPtrC |
|
85 */ |
|
86 inline TPtrC Value() const; |
|
87 |
|
88 /** |
|
89 * Returns the type of the element |
|
90 * @return TInt |
|
91 */ |
|
92 inline TInt Element() const; |
|
93 |
|
94 /** |
|
95 * Destructor. |
|
96 */ |
|
97 virtual ~CImpsSearchRequest(); |
|
98 |
|
99 private: |
|
100 |
|
101 /* |
|
102 * C++ constructor is private by default |
|
103 */ |
|
104 CImpsSearchRequest(); |
|
105 |
|
106 |
|
107 private: |
|
108 TImpsSearchElement iElement; |
|
109 HBufC* iValue; |
|
110 }; |
|
111 |
|
112 #include "ImpsFundFields.inl" |
|
113 |
|
114 #endif |
|
115 |
|
116 // End of File |