| Start/ | End/ | |||
| True | False | - | Line | Source |
| 1 | /* | |||
| 2 | * =========================================================================== | |||
| 3 | * Name : cvimpstprocessfriendrequestitem.cpp | |||
| 4 | * Part of : IMUiServiceTab/vimpstcmdprocess | |||
| 5 | * Description : | |||
| 6 | * Version : %version: 4.1.3 % | |||
| 7 | * | |||
| 8 | * Copyright © 2008 Nokia. All rights reserved. | |||
| 9 | * This material, including documentation and any related computer | |||
| 10 | * programs, is protected by copyright controlled by Nokia. All | |||
| 11 | * rights are reserved. Copying, including reproducing, storing, | |||
| 12 | * adapting or translating, any or all of this material requires the | |||
| 13 | * prior written consent of Nokia. This material also contains | |||
| 14 | * confidential information which may not be disclosed to others | |||
| 15 | * without the prior written consent of Nokia. | |||
| 16 | * ============================================================================ | |||
| 17 | */ | |||
| 18 | #include "cvimpstprocessfriendrequestitem.h" | |||
| 19 | #include "vimpstutils.h" | |||
| 20 | #include <vimpstuires.rsg> | |||
| 21 | ||||
| 22 | ||||
| 23 | // ----------------------------------------------------------------------------- | |||
| 24 | // CVIMPSTProcessFriendRequestItem::default constructor | |||
| 25 | // ----------------------------------------------------------------------------- | |||
| 26 | // | |||
| 6 | 6 | 27 | CVIMPSTProcessFriendRequestItem::CVIMPSTProcessFriendRequestItem() | |
| 28 | { | |||
| 29 | ||||
| 30 | } | |||
| 31 | ||||
| 32 | // ----------------------------------------------------------------------------- | |||
| 33 | // CVIMPSTProcessFriendRequestItem::NewL | |||
| 34 | // ----------------------------------------------------------------------------- | |||
| 35 | // | |||
| 6 | 0 | 36 | CVIMPSTProcessFriendRequestItem* CVIMPSTProcessFriendRequestItem::NewL(const TDesC& aRequesterId, | |
| 37 | const TDesC& aRequestorDisplayName) | |||
| 38 | { | |||
| 39 | CVIMPSTProcessFriendRequestItem* self = new (ELeave) CVIMPSTProcessFriendRequestItem(); | |||
| 40 | CleanupStack::PushL(self); | |||
| 41 | self->ConstructL(aRequesterId,aRequestorDisplayName); | |||
| 42 | CleanupStack::Pop(); | |||
| 43 | return self; | |||
| 44 | } | |||
| 45 | ||||
| 46 | // ----------------------------------------------------------------------------- | |||
| 47 | // CVIMPSTProcessFriendRequestItem::ConstructL | |||
| 48 | // ----------------------------------------------------------------------------- | |||
| 49 | // | |||
| 6 | 6 | 50 | void CVIMPSTProcessFriendRequestItem::ConstructL(const TDesC& aRequesterId, const TDesC& aRequestorDisplayName) | |
| 51 | { | |||
| 52 | iUesrId = aRequesterId.AllocL(); | |||
| 53 | iDisplayName = aRequestorDisplayName.AllocL(); | |||
| 54 | //load formatted string from resource. | |||
| 55 | iIndex = -1;//default index if no index is set. | |||
| 56 | } | |||
| 57 | ||||
| 58 | // ----------------------------------------------------------------------------- | |||
| 59 | // CVIMPSTProcessFriendRequestItem::destructor | |||
| 60 | // ----------------------------------------------------------------------------- | |||
| 61 | // | |||
| 2 | 2 | 62 | CVIMPSTProcessFriendRequestItem::~CVIMPSTProcessFriendRequestItem() | |
| 63 | { | |||
| 64 | delete iUesrId; | |||
| 65 | delete iDisplayName; | |||
| 66 | } | |||
| 67 | ||||
| 68 | // ----------------------------------------------------------------------------- | |||
| 69 | // CVIMPSTProcessFriendRequestItem::GetItemNameText | |||
| 70 | // ----------------------------------------------------------------------------- | |||
| 71 | // | |||
| 0 | 0 | - | 72 | TPtrC CVIMPSTProcessFriendRequestItem::GetItemNameText() |
| 73 | { | |||
| 74 | if((*iDisplayName).Length()) | |||
| 75 | return iDisplayName->Des(); | |||
| 76 | else | |||
| 77 | return iUesrId->Des(); | |||
| 78 | } | |||
| 79 | ||||
| 80 | // ----------------------------------------------------------------------------- | |||
| 81 | // CVIMPSTProcessFriendRequestItem::Type | |||
| 82 | // ----------------------------------------------------------------------------- | |||
| 83 | // | |||
| 0 | 0 | - | 84 | TVIMPSTEnums::TItem CVIMPSTProcessFriendRequestItem::Type() |
| 85 | { | |||
| 86 | return TVIMPSTEnums::EFriendRequestItem; | |||
| 87 | } | |||
| 88 | ||||
| 89 | /** | |||
| 90 | * Returns the user id of the listbox item | |||
| 91 | * @return TPtrC: user id of the listbox item. | |||
| 92 | */ | |||
| 18 | 0 | 93 | TPtrC CVIMPSTProcessFriendRequestItem::GetItemUserId() | |
| 94 | { | |||
| 95 | return iUesrId->Des(); | |||
| 96 | } | |||
| 97 | ||||
| 98 | // ----------------------------------------------------------------------------- | |||
| 99 | //CVIMPSTProcessFriendRequestItem: SetMsgPending | |||
| 100 | // ----------------------------------------------------------------------------- | |||
| 101 | // | |||
| 0 | 0 | - | 102 | void CVIMPSTProcessFriendRequestItem::SetMsgPending(TBool aPendingMessageStatus) |
| 103 | { | |||
| 104 | iSMsgPending = aPendingMessageStatus; | |||
| 105 | } | |||
| 106 | // ----------------------------------------------------------------------------- | |||
| 107 | //CVIMPSTProcessFriendRequestItem: GetMsgPending | |||
| 108 | // ----------------------------------------------------------------------------- | |||
| 109 | // | |||
| 0 | 0 | - | 110 | TBool CVIMPSTProcessFriendRequestItem::IsMsgPending() |
| 111 | { | |||
| 112 | return iSMsgPending; | |||
| 113 | } | |||
| 114 | // ----------------------------------------------------------------------------- | |||
| 115 | //CVIMPSTProcessFriendRequestItem: SetConversationOpen | |||
| 116 | // ----------------------------------------------------------------------------- | |||
| 117 | // | |||
| 0 | 0 | - | 118 | void CVIMPSTProcessFriendRequestItem::SetConversationOpen(TBool aConversationOpen) |
| 119 | { | |||
| 120 | iIsConversationOpen = aConversationOpen; | |||
| 121 | } | |||
| 122 | // ----------------------------------------------------------------------------- | |||
| 123 | //CVIMPSTProcessFriendRequestItem: IsConversationOpen | |||
| 124 | // ----------------------------------------------------------------------------- | |||
| 125 | // | |||
| 0 | 0 | - | 126 | TBool CVIMPSTProcessFriendRequestItem::IsConversationOpen() |
| 127 | { | |||
| 128 | return iIsConversationOpen; | |||
| 129 | } | |||
| ***TER 45% (5/11) of SOURCE FILE cvimpstprocessfriendrequestitem.cpp | ||||