| Start/ | End/ | |||
| True | False | - | Line | Source |
| 1 | /* | |||
| 2 | * =========================================================================== | |||
| 3 | * Name : cvimpstprocessfriendrequestitem.cpp | |||
| 4 | * Part of : IMUiServiceTab/vimpstcmdprocess | |||
| 5 | * Description : | |||
| 6 | * Version : %version: 4.1.2 % | |||
| 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 | { | |||
| 38 | CVIMPSTProcessFriendRequestItem* self = new (ELeave) CVIMPSTProcessFriendRequestItem(); | |||
| 39 | CleanupStack::PushL(self); | |||
| 40 | self->ConstructL(aRequesterId); | |||
| 41 | CleanupStack::Pop(); | |||
| 6 | 42 | return self; | ||
| 43 | } | |||
| 44 | ||||
| 45 | // ----------------------------------------------------------------------------- | |||
| 46 | // CVIMPSTProcessFriendRequestItem::ConstructL | |||
| 47 | // ----------------------------------------------------------------------------- | |||
| 48 | // | |||
| 6 | 6 | 49 | void CVIMPSTProcessFriendRequestItem::ConstructL(const TDesC& aRequesterId) | |
| 50 | { | |||
| 51 | iUesrId = aRequesterId.AllocL(); | |||
| 52 | //load formatted string from resource. | |||
| 53 | iItemNameText = VIMPSTUtils::LoadResourceL(R_SERVTAB_FRIEND_REQUEST); | |||
| 54 | iIndex = -1;//default index if no index is set. | |||
| 55 | } | |||
| 56 | ||||
| 57 | // ----------------------------------------------------------------------------- | |||
| 58 | // CVIMPSTProcessFriendRequestItem::destructor | |||
| 59 | // ----------------------------------------------------------------------------- | |||
| 60 | // | |||
| 2 | 2 | 61 | CVIMPSTProcessFriendRequestItem::~CVIMPSTProcessFriendRequestItem() | |
| 62 | { | |||
| 63 | delete iItemNameText; | |||
| 64 | delete iUesrId; | |||
| 65 | } | |||
| 66 | ||||
| 67 | // ----------------------------------------------------------------------------- | |||
| 68 | // CVIMPSTProcessFriendRequestItem::GetItemNameText | |||
| 69 | // ----------------------------------------------------------------------------- | |||
| 70 | // | |||
| 0 | 0 | - | 71 | TPtrC CVIMPSTProcessFriendRequestItem::GetItemNameText() |
| 72 | { | |||
| 0 | - | 73 | return iItemNameText->Des(); | |
| 74 | } | |||
| 75 | ||||
| 76 | // ----------------------------------------------------------------------------- | |||
| 77 | // CVIMPSTProcessFriendRequestItem::Type | |||
| 78 | // ----------------------------------------------------------------------------- | |||
| 79 | // | |||
| 0 | 0 | - | 80 | TVIMPSTEnums::TItem CVIMPSTProcessFriendRequestItem::Type() |
| 81 | { | |||
| 0 | - | 82 | return TVIMPSTEnums::EFriendRequestItem; | |
| 83 | } | |||
| 84 | ||||
| 85 | /** | |||
| 86 | * Returns the user id of the listbox item | |||
| 87 | * @return TPtrC: user id of the listbox item. | |||
| 88 | */ | |||
| 18 | 0 | 89 | TPtrC CVIMPSTProcessFriendRequestItem::GetItemUserId() | |
| 90 | { | |||
| 18 | 91 | return iUesrId->Des(); | ||
| 92 | } | |||
| 93 | ||||
| 94 | // ----------------------------------------------------------------------------- | |||
| 95 | //CVIMPSTProcessFriendRequestItem: SetMsgPending | |||
| 96 | // ----------------------------------------------------------------------------- | |||
| 97 | // | |||
| 0 | 0 | - | 98 | void CVIMPSTProcessFriendRequestItem::SetMsgPending(TBool aPendingMessageStatus) |
| 99 | { | |||
| 100 | iSMsgPending = aPendingMessageStatus; | |||
| 101 | } | |||
| 102 | // ----------------------------------------------------------------------------- | |||
| 103 | //CVIMPSTProcessFriendRequestItem: GetMsgPending | |||
| 104 | // ----------------------------------------------------------------------------- | |||
| 105 | // | |||
| 0 | 0 | - | 106 | TBool CVIMPSTProcessFriendRequestItem::IsMsgPending() |
| 107 | { | |||
| 0 | - | 108 | return iSMsgPending; | |
| 109 | } | |||
| 110 | // ----------------------------------------------------------------------------- | |||
| 111 | //CVIMPSTProcessFriendRequestItem: SetConversationOpen | |||
| 112 | // ----------------------------------------------------------------------------- | |||
| 113 | // | |||
| 0 | 0 | - | 114 | void CVIMPSTProcessFriendRequestItem::SetConversationOpen(TBool aConversationOpen) |
| 115 | { | |||
| 116 | iIsConversationOpen = aConversationOpen; | |||
| 117 | } | |||
| 118 | // ----------------------------------------------------------------------------- | |||
| 119 | //CVIMPSTProcessFriendRequestItem: IsConversationOpen | |||
| 120 | // ----------------------------------------------------------------------------- | |||
| 121 | // | |||
| 0 | 0 | - | 122 | TBool CVIMPSTProcessFriendRequestItem::IsConversationOpen() |
| 123 | { | |||
| 0 | - | 124 | return iIsConversationOpen; | |
| 125 | } | |||
| ***TER 41% (7/17) of SOURCE FILE cvimpstprocessfriendrequestitem.cpp | ||||