|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "ccontentinfo.h" |
|
19 #include "OstTraceDefinitions.h" |
|
20 #ifdef OST_TRACE_COMPILER_IN_USE |
|
21 #include "ccontentinfoTraces.h" |
|
22 #endif |
|
23 |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CContentInfo::NewL() |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 CContentInfo* CContentInfo::NewL() |
|
30 { |
|
31 OstTraceFunctionEntry0( CCONTENTINFO_NEWL_ENTRY ); |
|
32 CContentInfo* instance = CContentInfo::NewLC(); |
|
33 CleanupStack::Pop( instance ); |
|
34 OstTraceFunctionExit0( CCONTENTINFO_NEWL_EXIT ); |
|
35 return instance; |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CContentInfo::NewLC() |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CContentInfo* CContentInfo::NewLC() |
|
43 { |
|
44 OstTraceFunctionEntry0( CCONTENTINFO_NEWLC_ENTRY ); |
|
45 CContentInfo* instance = new (ELeave) CContentInfo(); |
|
46 CleanupStack::PushL( instance ); |
|
47 OstTraceFunctionExit0( CCONTENTINFO_NEWLC_EXIT ); |
|
48 return instance; |
|
49 } |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CContentInfo::CContentInfo() |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 CContentInfo::CContentInfo() |
|
55 { |
|
56 //Do necessary initialization here |
|
57 } |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CContentInfo::~CContentInfo() |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 CContentInfo::~CContentInfo() |
|
63 { |
|
64 delete iContentName; |
|
65 } |
|
66 // ----------------------------------------------------------------------------- |
|
67 // CContentInfo::GetNameL() |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 HBufC* CContentInfo::GetNameL() |
|
71 { |
|
72 OstTraceFunctionEntry0( CCONTENTINFO_GETNAMEL_ENTRY ); |
|
73 HBufC* contentname = NULL; |
|
74 if ( iContentName->Length() ) |
|
75 { |
|
76 contentname = iContentName->AllocL(); |
|
77 } |
|
78 OstTraceFunctionExit0( CCONTENTINFO_GETNAMEL_EXIT ); |
|
79 return contentname; |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CContentInfo::GetIndexStatusL() |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 TInt CContentInfo::GetIndexStatus() |
|
87 { |
|
88 return iIndexStatus; |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CContentInfo::GetBlacklistStatusL() |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 TInt CContentInfo::GetBlacklistStatus() |
|
96 { |
|
97 return iBlacklistStatus; |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CContentInfo::SetNameL() |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 void CContentInfo::SetNameL( const TDesC& aName ) |
|
105 { |
|
106 OstTraceFunctionEntry0( CCONTENTINFO_SETNAMEL_ENTRY ); |
|
107 if ( iContentName ) |
|
108 { |
|
109 delete iContentName; |
|
110 iContentName = NULL; |
|
111 } |
|
112 |
|
113 iContentName = HBufC::NewL( aName.Length() ); |
|
114 iContentName->Des().Copy( aName ); |
|
115 OstTraceFunctionExit0( CCONTENTINFO_SETNAMEL_EXIT ); |
|
116 } |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // CContentInfo::SetIndexStatusL() |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 void CContentInfo::SetIndexStatus( const TInt aIndexStatus ) |
|
123 { |
|
124 iIndexStatus = aIndexStatus; |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // CContentInfo::SetBlacklistStatusL() |
|
129 // ----------------------------------------------------------------------------- |
|
130 // |
|
131 void CContentInfo::SetBlacklistStatus( const TBool aBlacklistStatus ) |
|
132 { |
|
133 iBlacklistStatus = aBlacklistStatus; |
|
134 } |
|
135 //EOF |