photosgallery/viewframework/commandhandlers/commoncommandhandlers/tsrc/t_glxcommandhandlerback/Src/t_cglxcommandhandlerback.cpp
equal
deleted
inserted
replaced
34 // CONSTRUCTION |
34 // CONSTRUCTION |
35 t_cglxcommandhandlerback* t_cglxcommandhandlerback::NewL() |
35 t_cglxcommandhandlerback* t_cglxcommandhandlerback::NewL() |
36 { |
36 { |
37 EUNIT_PRINT(_L("t_cglxcommandhandlerback::NewL()")); |
37 EUNIT_PRINT(_L("t_cglxcommandhandlerback::NewL()")); |
38 t_cglxcommandhandlerback* self = t_cglxcommandhandlerback::NewLC(); |
38 t_cglxcommandhandlerback* self = t_cglxcommandhandlerback::NewLC(); |
39 CleanupStack::Pop(); |
39 CleanupStack::Pop( self ); |
40 |
|
41 return self; |
40 return self; |
42 } |
41 } |
43 |
42 |
44 t_cglxcommandhandlerback* t_cglxcommandhandlerback::NewLC() |
43 t_cglxcommandhandlerback* t_cglxcommandhandlerback::NewLC() |
45 { |
44 { |
46 EUNIT_PRINT(_L("ut_cglxcommandhandlerback::NewLC()")); |
45 EUNIT_PRINT(_L("ut_cglxcommandhandlerback::NewLC()")); |
47 t_cglxcommandhandlerback* self = new( ELeave ) t_cglxcommandhandlerback(); |
46 t_cglxcommandhandlerback* self = new( ELeave ) t_cglxcommandhandlerback(); |
48 CleanupStack::PushL( self ); |
47 CleanupStack::PushL( self ); |
49 |
|
50 self->ConstructL(); |
48 self->ConstructL(); |
51 |
|
52 return self; |
49 return self; |
53 } |
50 } |
54 |
51 |
55 // Destructor (virtual by CBase) |
52 // Destructor (virtual by CBase) |
56 t_cglxcommandhandlerback::~t_cglxcommandhandlerback() |
53 t_cglxcommandhandlerback::~t_cglxcommandhandlerback() |
81 |
78 |
82 // Create static media list |
79 // Create static media list |
83 iMediaList = MGlxMediaList::InstanceL(*path); |
80 iMediaList = MGlxMediaList::InstanceL(*path); |
84 if(iMediaList) |
81 if(iMediaList) |
85 { |
82 { |
86 |
|
87 // Attribute to be used |
83 // Attribute to be used |
88 TMPXAttribute attrTitle(KMPXMediaGeneralTitle); |
84 TMPXAttribute attrTitle(KMPXMediaGeneralTitle); |
89 //TMPXAttribute attrCount(KMPXMediaGeneralCount); |
|
90 |
85 |
91 // add a static items |
86 // add a static items |
92 TGlxMediaId testId(12345); |
87 TGlxMediaId testId(12345); |
93 CGlxMedia* newMedia1 = new (ELeave) CGlxMedia(testId); |
88 CGlxMedia* newMedia1 = new (ELeave) CGlxMedia(testId); |
94 CleanupStack::PushL(newMedia1); |
89 CleanupStack::PushL(newMedia1); |
103 newMedia2->SetTextValueL(attrTitle, _L("Portugal")); |
98 newMedia2->SetTextValueL(attrTitle, _L("Portugal")); |
104 iMediaList->AddStaticItemL(newMedia2, NGlxListDefs::EInsertLast); |
99 iMediaList->AddStaticItemL(newMedia2, NGlxListDefs::EInsertLast); |
105 CleanupStack::Pop(newMedia2); |
100 CleanupStack::Pop(newMedia2); |
106 } |
101 } |
107 |
102 |
108 CleanupStack::PopAndDestroy(); // path |
103 CleanupStack::PopAndDestroy( path ); |
109 } |
104 } |
110 |
105 |
111 MGlxMediaList& t_cglxcommandhandlerback::MediaList() |
106 MGlxMediaList& t_cglxcommandhandlerback::MediaList() |
112 { |
107 { |
113 EUNIT_PRINT(_L("ut_cglxcommandhandlerback::MediaList()")); |
108 EUNIT_PRINT(_L("ut_cglxcommandhandlerback::MediaList()")); |
136 } |
131 } |
137 |
132 |
138 void t_cglxcommandhandlerback::SetupPreviousNaviViewChWithoutMlL( ) |
133 void t_cglxcommandhandlerback::SetupPreviousNaviViewChWithoutMlL( ) |
139 { |
134 { |
140 EUNIT_PRINT(_L("t_cglxcommandhandlerback::SetupPreviousNaviViewChWithoutMlL( )")); |
135 EUNIT_PRINT(_L("t_cglxcommandhandlerback::SetupPreviousNaviViewChWithoutMlL( )")); |
141 // iCommand = CGlxCommandHandlerBack::NewPreviousNaviViewCommandHandlerL(); |
|
142 } |
136 } |
143 |
137 |
144 void t_cglxcommandhandlerback::SetupPreviousNaviViewChWithMlL( ) |
138 void t_cglxcommandhandlerback::SetupPreviousNaviViewChWithMlL( ) |
145 { |
139 { |
146 EUNIT_PRINT(_L("t_cglxcommandhandlerback::SetupPreviousNaviViewChWithMlL( )")); |
140 EUNIT_PRINT(_L("t_cglxcommandhandlerback::SetupPreviousNaviViewChWithMlL( )")); |
147 CreateMediaListL(); |
141 CreateMediaListL(); |
148 |
|
149 // iCommand = CGlxCommandHandlerBack::NewPreviousNaviViewCommandHandlerL(this); |
|
150 } |
142 } |
151 |
143 |
152 void t_cglxcommandhandlerback::SetupContainerPreviousViewChWithoutViewId( ) |
144 void t_cglxcommandhandlerback::SetupContainerPreviousViewChWithoutViewId( ) |
153 { |
145 { |
154 EUNIT_PRINT(_L("t_cglxcommandhandlerback::SetupContainerPreviousViewChWithoutViewId( )")); |
146 EUNIT_PRINT(_L("t_cglxcommandhandlerback::SetupContainerPreviousViewChWithoutViewId( )")); |