|
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: MNcdPreminetProtocolEntityRef declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NcdPREMINETPROTOCOLENTITYREF_H |
|
20 #define NcdPREMINETPROTOCOLENTITYREF_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class MNcdPreminetProtocolEntityRef |
|
25 { |
|
26 public: |
|
27 |
|
28 enum TType |
|
29 { |
|
30 EFolderRef, |
|
31 EItemRef, |
|
32 EActionRef, |
|
33 EPromoRef |
|
34 }; |
|
35 |
|
36 enum TDescription |
|
37 { |
|
38 ENormal, |
|
39 ESearchResults, |
|
40 EServices, |
|
41 ERecommendations |
|
42 }; |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 */ |
|
47 virtual ~MNcdPreminetProtocolEntityRef() {} |
|
48 |
|
49 /** |
|
50 * Returns the type of this reference entity. |
|
51 * @return TType |
|
52 */ |
|
53 virtual TType Type() const = 0; |
|
54 |
|
55 /** |
|
56 * Returns the description of this reference entity. |
|
57 * @return TDescription |
|
58 */ |
|
59 virtual TDescription Description() const = 0; |
|
60 |
|
61 /** |
|
62 * Returns the ID of the parent entity. |
|
63 * This entity should be added to the parent's child list, |
|
64 * @return Parent id or KNullDesC if parentless. |
|
65 */ |
|
66 virtual const TDesC& ParentId() const = 0; |
|
67 |
|
68 /** |
|
69 * Returns the ID of this entity. |
|
70 * @return Id |
|
71 */ |
|
72 virtual const TDesC& Id() const = 0; |
|
73 /** |
|
74 * Returns the last modified date for this entity. |
|
75 * @return Last modified time, or 0 if never modified. |
|
76 */ |
|
77 virtual const TDesC& Timestamp() const = 0; |
|
78 |
|
79 /** |
|
80 * If this is a remote reference, the target uri is |
|
81 * retrieved with this method. If the reference is local, |
|
82 * KNullDesC is returned. |
|
83 * @return Remote uri or KNullDesC. |
|
84 */ |
|
85 virtual const TDesC& RemoteUri() const = 0; |
|
86 |
|
87 /** |
|
88 * Returns the namespace for this entity |
|
89 * @return namespace or KNullDesC if not available |
|
90 */ |
|
91 virtual const TDesC& Namespace() const = 0; |
|
92 |
|
93 /** |
|
94 * Returns the query ids related to this entity. |
|
95 * The array may be empty. |
|
96 * @return Query id array |
|
97 */ |
|
98 virtual const RArray<TInt>& Queries() const = 0; |
|
99 |
|
100 /** |
|
101 * Retrieves the server uri from which this reference was received |
|
102 * @return Server URI |
|
103 */ |
|
104 virtual const TDesC& ServerUri() const = 0; |
|
105 |
|
106 /** |
|
107 * Returns the namespace of the parent of this entity. |
|
108 * @return namespace or KNullDesC if not available |
|
109 */ |
|
110 virtual const TDesC& ParentNamespace() const = 0; |
|
111 |
|
112 /** |
|
113 * Returns the validity time in minutes. |
|
114 * @return Validity time, 0 if not set. |
|
115 */ |
|
116 virtual TInt ValidUntilDelta() const = 0; |
|
117 |
|
118 /** |
|
119 * Returns true if the client may update the entity automatically |
|
120 * @return true or false (default false) |
|
121 */ |
|
122 virtual TBool ValidUntilAutoUpdate() const = 0; |
|
123 |
|
124 }; |
|
125 |
|
126 #endif |