|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // WAP Push Message Inline functions File for the Utility class |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedPartner |
|
21 @released |
|
22 */ |
|
23 |
|
24 _LIT(KPushSIContentTypeDesC, "text/vnd.wap.si"); |
|
25 |
|
26 |
|
27 /** |
|
28 Gets the SI ID. |
|
29 |
|
30 As a server can send many different versions of the same SI Push Message, only the |
|
31 latest of which is valid. The ID allows the UI and WAP Push architecture to locate any |
|
32 previous instances of the message. |
|
33 |
|
34 If SI ID does not exist, a null descriptor is returned. |
|
35 |
|
36 @return |
|
37 SI ID of the SI message. |
|
38 */ |
|
39 inline const TDesC& CSIPushMsgEntry::Id() const |
|
40 { |
|
41 if (iMsgID) |
|
42 return *iMsgID; |
|
43 else |
|
44 return KNullDesC; |
|
45 } |
|
46 |
|
47 |
|
48 /** |
|
49 Gets the time that the Push Message was created. |
|
50 |
|
51 @return |
|
52 Creation time. |
|
53 */ |
|
54 inline const TTime& CSIPushMsgEntry::Created() const |
|
55 { |
|
56 return iCreatedDate; |
|
57 } |
|
58 |
|
59 |
|
60 /** |
|
61 Sets the time that the Push Message was created. |
|
62 |
|
63 @param aCreated |
|
64 Creation time. |
|
65 */ |
|
66 inline void CSIPushMsgEntry::SetCreated(const TTime& aCreated) |
|
67 { |
|
68 iCreatedDate=aCreated; |
|
69 } |
|
70 |
|
71 |
|
72 /** |
|
73 Gets the expiry date and time for the Push Message. |
|
74 |
|
75 The value is set by either SetExpires(), or by RetrieveL() on a previously |
|
76 saved message entry. |
|
77 |
|
78 @return |
|
79 Expiry date and time. |
|
80 */ |
|
81 inline const TTime& CSIPushMsgEntry:: Expires() const |
|
82 { |
|
83 return iExpiryDate; |
|
84 } |
|
85 |
|
86 |
|
87 /** |
|
88 Sets the Expires time. |
|
89 |
|
90 @param aExpires |
|
91 Expiry date and time of the SI message. |
|
92 */ |
|
93 inline void CSIPushMsgEntry::SetExpires(const TTime& aExpires) |
|
94 { |
|
95 iExpiryDate=aExpires; |
|
96 } |
|
97 |
|
98 |
|
99 /** |
|
100 Gets the URL of the service to be accessed. |
|
101 |
|
102 If there is no URL in the message, then a NULL descriptor will be returned. |
|
103 |
|
104 @return |
|
105 URL of the service to be accessed. |
|
106 */ |
|
107 inline const TDesC& CSIPushMsgEntry::Url() const |
|
108 { |
|
109 if (iUrl) |
|
110 return *iUrl; |
|
111 else |
|
112 return KNullDesC; |
|
113 } |
|
114 |
|
115 |
|
116 /** |
|
117 Gets the Content Type of the message. |
|
118 |
|
119 This content type is defined for both SI and SIC Push Messages. This is because the SI content |
|
120 handler deals with both types, decoding the WBXML versions prior to parsing, so there is |
|
121 effectively no difference. |
|
122 |
|
123 @return |
|
124 The Content Type of the message. |
|
125 */ |
|
126 inline const TDesC& CSIPushMsgEntry::ContentType() const |
|
127 { |
|
128 // Generalise -group si & sic together! |
|
129 return KPushSIContentTypeDesC; |
|
130 } |
|
131 |
|
132 |
|
133 |
|
134 |