|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 presence icon information. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "CPbk2PresenceIconInfo.h" |
|
20 |
|
21 // System includes |
|
22 #include <fbs.h> |
|
23 |
|
24 EXPORT_C CPbk2PresenceIconInfo* CPbk2PresenceIconInfo::NewL( |
|
25 const TDesC8& aBrandId, |
|
26 const TDesC8& aElementId, |
|
27 const TDesC16& aServiceName ) |
|
28 { |
|
29 CPbk2PresenceIconInfo* self = |
|
30 new ( ELeave ) CPbk2PresenceIconInfo(); |
|
31 CleanupStack::PushL( self ); |
|
32 self->ConstructL( aBrandId, aElementId, aServiceName ); |
|
33 CleanupStack::Pop( self ); |
|
34 return self; |
|
35 } |
|
36 |
|
37 CPbk2PresenceIconInfo::~CPbk2PresenceIconInfo() |
|
38 { |
|
39 delete iBrandId; |
|
40 delete iElementId; |
|
41 delete iServiceName; |
|
42 delete iBitmap; |
|
43 delete iBitmapMask; |
|
44 } |
|
45 |
|
46 CPbk2PresenceIconInfo::CPbk2PresenceIconInfo() |
|
47 { |
|
48 } |
|
49 |
|
50 void CPbk2PresenceIconInfo::ConstructL( |
|
51 const TDesC8& aBrandId, |
|
52 const TDesC8& aElementId, |
|
53 const TDesC16& aServiceName ) |
|
54 { |
|
55 iBrandId = aBrandId.AllocL(); |
|
56 iElementId = aElementId.AllocL(); |
|
57 iServiceName = aServiceName.AllocL(); |
|
58 } |
|
59 |
|
60 EXPORT_C void CPbk2PresenceIconInfo::SetBitmap( |
|
61 CFbsBitmap* aBitmap, |
|
62 CFbsBitmap* aBitmapMask ) |
|
63 { |
|
64 if ( iBitmap != NULL ) |
|
65 { |
|
66 delete iBitmap; |
|
67 } |
|
68 iBitmap = aBitmap; |
|
69 |
|
70 if ( iBitmapMask != NULL ) |
|
71 { |
|
72 delete iBitmapMask; |
|
73 } |
|
74 iBitmapMask = aBitmapMask; |
|
75 } |
|
76 |
|
77 EXPORT_C const TDesC8& CPbk2PresenceIconInfo::BrandId() |
|
78 { |
|
79 return *iBrandId; |
|
80 } |
|
81 |
|
82 EXPORT_C const TDesC8& CPbk2PresenceIconInfo::ElementId() |
|
83 { |
|
84 return *iElementId; |
|
85 } |
|
86 |
|
87 EXPORT_C const TDesC16& CPbk2PresenceIconInfo::ServiceName() |
|
88 { |
|
89 return *iServiceName; |
|
90 } |
|
91 |
|
92 EXPORT_C const CFbsBitmap* CPbk2PresenceIconInfo::IconBitmap() |
|
93 { |
|
94 return iBitmap; |
|
95 } |
|
96 |
|
97 EXPORT_C const CFbsBitmap* CPbk2PresenceIconInfo::IconBitmapMask() |
|
98 { |
|
99 return iBitmapMask; |
|
100 } |
|
101 |
|
102 // End of File |