|
1 // Copyright (c) 2000-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 Gets the transmission date for Push Messages other than SI. |
|
24 |
|
25 For SI message the user should call CSISLPushMsgUtils::GetCreationDateL() as this function panics |
|
26 if the message type is SI. |
|
27 |
|
28 @param aId |
|
29 The ID of the message to get Transmission Date. |
|
30 |
|
31 @return |
|
32 Date of transmission of message. |
|
33 |
|
34 @leave KErrNotFound Message Id is not valid and entry does not exist. |
|
35 @leave CMsvEntry::SetEntryL |
|
36 @leave CMsvEntry::HasStoreL |
|
37 |
|
38 @panic CSISLPushMsgUtils 0 |
|
39 If the message type is SI. |
|
40 */ |
|
41 inline TTime CSISLPushMsgUtils::GetTransmissionDateL(TMsvId aId) |
|
42 { |
|
43 // Must be a Push message, shouldn't be an SI message - use GetCreationDate |
|
44 __ASSERT_ALWAYS( (iMsvEntry->Entry().iMtm == KUidMtmWapPush) |
|
45 && iMsvEntry->Entry().iBioType == KUidWapPushMsgSL.iUid, |
|
46 User::Panic(KSISLPushMsgUtilsPanicTitle,ESISLPushMsgUtilsNotValidPushMsg)); |
|
47 return GetDateL(aId, KUidWapPushMsgSL); |
|
48 } |
|
49 |
|
50 |
|
51 /** |
|
52 Gets the Creation date for SI Push Messages. |
|
53 |
|
54 For any other types of message the user should call CSISLPushMsgUtils::GetTransmissionDateL() |
|
55 as this function panics if the message type is not SI. |
|
56 |
|
57 @param aId |
|
58 The ID of the message to get Creation Date. |
|
59 |
|
60 @return |
|
61 Date of creation of message. |
|
62 |
|
63 @leave KErrNotFound Message Id is not valid and entry does not exist. |
|
64 @leave CMsvEntry::SetEntryL |
|
65 @leave CMsvEntry::HasStoreL |
|
66 |
|
67 @panic CSISLPushMsgUtils 1 |
|
68 If the message type is not SI. |
|
69 */ |
|
70 inline TTime CSISLPushMsgUtils::GetCreationDateL(TMsvId aId) |
|
71 { |
|
72 __ASSERT_ALWAYS(iMsvEntry->Entry().iBioType == KUidWapPushMsgSI.iUid, |
|
73 User::Panic(KSISLPushMsgUtilsPanicTitle,ESISLPushMsgUtilsNotSiMsg)); |
|
74 return GetDateL(aId, KUidWapPushMsgSI); |
|
75 } |