22 #include <e32property.h> |
22 #include <e32property.h> |
23 #include <imconnectionproviderconsts.h> |
23 #include <imconnectionproviderconsts.h> |
24 |
24 |
25 #include "cvimpstdetailsviewpluginfactory.h" |
25 #include "cvimpstdetailsviewpluginfactory.h" |
26 #include "cvimpstdetailsviewplugin.h" |
26 #include "cvimpstdetailsviewplugin.h" |
27 #include "vimpstdebugtrace.h" |
27 |
|
28 #include "uiservicetabtracer.h" |
28 // meco service uid |
29 // meco service uid |
29 #define KMECOIMPLEMENTATIONUID 0x20012423 |
30 #define KMECOIMPLEMENTATIONUID 0x20012423 |
30 // --------------------------------------------------------------------------- |
31 // --------------------------------------------------------------------------- |
31 // CVIMPSTDetailsViewPluginFactory::NewL |
32 // CVIMPSTDetailsViewPluginFactory::NewL |
32 // --------------------------------------------------------------------------- |
33 // --------------------------------------------------------------------------- |
53 // CVIMPSTDetailsViewPluginFactory::ConstructL |
54 // CVIMPSTDetailsViewPluginFactory::ConstructL |
54 // --------------------------------------------------------------------------- |
55 // --------------------------------------------------------------------------- |
55 // |
56 // |
56 void CVIMPSTDetailsViewPluginFactory::ConstructL() |
57 void CVIMPSTDetailsViewPluginFactory::ConstructL() |
57 { |
58 { |
58 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::ConstructL() start") ); |
59 TRACER_AUTO; |
|
60 |
59 RProperty::Define(KMeCoPropertyUid, KMeCoXSPDetailsServiceIdKey, RProperty::EInt, |
61 RProperty::Define(KMeCoPropertyUid, KMeCoXSPDetailsServiceIdKey, RProperty::EInt, |
60 ECapabilityReadUserData ,ECapabilityWriteUserData); |
62 ECapabilityReadUserData ,ECapabilityWriteUserData); |
61 |
63 |
62 ReadServiceIdL(); |
64 ReadServiceIdL(); |
63 if(iServiceIds.Count() == 0) |
65 if(iServiceIds.Count() == 0) |
64 { |
66 { |
65 User::Leave(KErrArgument); |
67 User::Leave(KErrArgument); |
66 } |
68 } |
67 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::ConstructL() end") ); |
69 |
68 } |
70 } |
69 // --------------------------------------------------------------------------- |
71 // --------------------------------------------------------------------------- |
70 // CVIMPSTDetailsViewPluginFactory::~CVIMPSTDetailsViewPluginFactory |
72 // CVIMPSTDetailsViewPluginFactory::~CVIMPSTDetailsViewPluginFactory |
71 // --------------------------------------------------------------------------- |
73 // --------------------------------------------------------------------------- |
72 // |
74 // |
81 // CVIMPSTDetailsViewPluginFactory::TabViewCount |
83 // CVIMPSTDetailsViewPluginFactory::TabViewCount |
82 // --------------------------------------------------------------------------- |
84 // --------------------------------------------------------------------------- |
83 // |
85 // |
84 TInt CVIMPSTDetailsViewPluginFactory::TabViewCount() |
86 TInt CVIMPSTDetailsViewPluginFactory::TabViewCount() |
85 { |
87 { |
|
88 TRACER_AUTO; |
86 // read the service id from RProperty |
89 // read the service id from RProperty |
87 RProperty::Get(KMeCoPropertyUid, KMeCoXSPDetailsServiceIdKey, iServiceId ); |
90 RProperty::Get(KMeCoPropertyUid, KMeCoXSPDetailsServiceIdKey, iServiceId ); |
88 TInt returnVal = 0; |
91 TInt returnVal = 0; |
89 if( iServiceId <= 0 ) |
92 if( iServiceId <= 0 ) |
90 { |
93 { |
91 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::TabViewCount() iservice <=0") ); |
94 TRACE("iservice <=0"); |
92 return iServiceIds.Count(); |
95 return iServiceIds.Count(); |
93 } |
96 } |
94 else |
97 else |
95 { |
98 { |
96 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::TabViewCount() iservice > 0") ); |
99 TRACE("iservice > 0"); |
97 iServiceIds.Reset(); |
100 iServiceIds.Reset(); |
98 iServiceIds.Append( iServiceId ); |
101 iServiceIds.Append( iServiceId ); |
99 returnVal = 1; |
102 returnVal = 1; |
100 } |
103 } |
101 return returnVal; |
104 return returnVal; |
105 // CVIMPSTDetailsViewPluginFactory::CreateTabViewL |
108 // CVIMPSTDetailsViewPluginFactory::CreateTabViewL |
106 // --------------------------------------------------------------------------- |
109 // --------------------------------------------------------------------------- |
107 // |
110 // |
108 CCCAppViewPluginBase* CVIMPSTDetailsViewPluginFactory::CreateTabViewL( TInt aIndex ) |
111 CCCAppViewPluginBase* CVIMPSTDetailsViewPluginFactory::CreateTabViewL( TInt aIndex ) |
109 { |
112 { |
110 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::CreateTabViewL() start") ); |
113 TRACER_AUTO; |
111 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::CreateTabViewL() aIndex = %d"),aIndex ); |
114 |
|
115 TRACE("aIndex = %d", aIndex); |
112 CCCAppViewPluginBase* viewPluginBase = NULL; |
116 CCCAppViewPluginBase* viewPluginBase = NULL; |
113 if( aIndex < iServiceIds.Count() && aIndex >= 0 ) |
117 if( aIndex < iServiceIds.Count() && aIndex >= 0 ) |
114 { |
118 { |
115 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::CreateTabViewL() creating view aIndex = %d"),aIndex ); |
119 TRACE("creating view aIndex = %d", aIndex); |
116 viewPluginBase = CVIMPSTDetailsViewPlugin::NewL( iServiceIds[aIndex]); |
120 viewPluginBase = CVIMPSTDetailsViewPlugin::NewL( iServiceIds[aIndex]); |
117 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::CreateTabViewL() view created") ); |
121 TRACE("view created"); |
118 } |
122 } |
119 else |
123 else |
120 { |
124 { |
121 User::Leave(KErrArgument); |
125 User::Leave(KErrArgument); |
122 } |
126 } |
123 TRACED( T_LIT("CVIMPSTDetailsViewPluginFactory::CreateTabViewL() end ") ); |
127 |
124 return viewPluginBase; |
128 return viewPluginBase; |
125 } |
129 } |
126 |
130 |
127 // --------------------------------------------------------------------------- |
131 // --------------------------------------------------------------------------- |
128 // CVIMPSTDetailsViewPluginFactory::ReadServiceIdL |
132 // CVIMPSTDetailsViewPluginFactory::ReadServiceIdL |
129 // --------------------------------------------------------------------------- |
133 // --------------------------------------------------------------------------- |
130 // |
134 // |
131 TInt CVIMPSTDetailsViewPluginFactory::ReadServiceIdL() |
135 TInt CVIMPSTDetailsViewPluginFactory::ReadServiceIdL() |
132 { |
136 { |
|
137 TRACER_AUTO; |
133 CSPSettings* settings = CSPSettings::NewLC(); |
138 CSPSettings* settings = CSPSettings::NewLC(); |
134 iServiceIds.Reset(); |
139 iServiceIds.Reset(); |
135 ///////////////////////Get Service Id//////////////// |
140 ///////////////////////Get Service Id//////////////// |
136 RArray<TServiceId> services; |
141 RArray<TServiceId> services; |
137 CleanupClosePushL( services ); |
142 CleanupClosePushL( services ); |